fix: rewrite events.go with raw Go source (was base64-corrupted)
This commit is contained in:
+15
-15
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user