From 357cecca84aa9e57acd7245b16b58c9045656f0a Mon Sep 17 00:00:00 2001 From: Dimitris Karvounis <1+jimkarvo@jksoftware.gr> Date: Mon, 29 Jun 2026 20:14:47 +0000 Subject: [PATCH] fix: rewrite events.go with raw Go source (was base64-corrupted) --- internal/webhook/events.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/internal/webhook/events.go b/internal/webhook/events.go index f48e31e..9a55c62 100644 --- a/internal/webhook/events.go +++ b/internal/webhook/events.go @@ -6,11 +6,11 @@ import "time" type GiteaEventType string const ( - EventPullRequest GiteaEventType = "pull_request" - EventPullRequestReview GiteaEventType = "pull_request_review" - EventPullRequestComment GiteaEventType = "pull_request_comment" - EventIssues GiteaEventType = "issues" - EventIssueComment GiteaEventType = "issue_comment" + EventPullRequest GiteaEventType = "pull_request" + EventPullRequestReview GiteaEventType = "pull_request_review" + EventPullRequestComment GiteaEventType = "pull_request_comment" + EventIssues GiteaEventType = "issues" + EventIssueComment GiteaEventType = "issue_comment" ) // GiteaUser represents a Gitea user in webhook payloads @@ -82,7 +82,7 @@ type Review struct { // Commit represents a Git commit in webhook payloads type Commit struct { - ID string `json:"id"` // SHA + ID string `json:"id"` // SHA Message string `json:"message"` URL string `json:"url"` Author GitUser `json:"author"` @@ -99,15 +99,15 @@ type GitUser struct { // PullRequestEvent is the payload for pull_request webhooks type PullRequestEvent struct { - Action string `json:"action"` // opened, closed, reopened, edited, assigned, unassigned, review_requested, synchronize, etc. - Number int64 `json:"number"` - PullRequest PullRequest `json:"pull_request"` - Repository Repository `json:"repository"` - Sender GiteaUser `json:"sender"` - RequestedReviewers []GiteaUser `json:"requested_reviewers"` - RequestedReviewer *GiteaUser `json:"requested_reviewer"` // Present on review_requested action (singular) - Assignee *GiteaUser `json:"assignee"` // Present on assigned/unassigned action - Commits []Commit `json:"commits"` // Present on synchronize action + Action string `json:"action"` // opened, closed, reopened, edited, assigned, unassigned, review_requested, synchronize, etc. + Number int64 `json:"number"` + PullRequest PullRequest `json:"pull_request"` + Repository Repository `json:"repository"` + Sender GiteaUser `json:"sender"` + RequestedReviewers []GiteaUser `json:"requested_reviewers"` + RequestedReviewer *GiteaUser `json:"requested_reviewer"` // Present on review_requested action (singular) + Assignee *GiteaUser `json:"assignee"` // Present on assigned/unassigned action + Commits []Commit `json:"commits"` // Present on synchronize action } // PullRequestReviewEvent is the payload for pull_request_review webhooks