package forgejo // The structs below are minimal subsets of the Forgejo/Gitea webhook JSON // payloads (https://forgejo.org/docs/latest/user/webhooks/) — only the // fields yaju-keisatsu actually reads. type WebhookUser struct { Login string `json:"login"` } type WebhookRepository struct { Name string `json:"name"` FullName string `json:"full_name"` Owner WebhookUser `json:"owner"` DefaultBranch string `json:"default_branch"` } type WebhookIssue struct { Number int64 `json:"number"` Body string `json:"body"` } type WebhookComment struct { Body string `json:"body"` User WebhookUser `json:"user"` } // IssueCommentPayload is the body of a Forgejo "issue_comment" webhook // event. It fires for comments on both issues and pull requests. type IssueCommentPayload struct { Action string `json:"action"` Issue WebhookIssue `json:"issue"` Comment WebhookComment `json:"comment"` Repository WebhookRepository `json:"repository"` Sender WebhookUser `json:"sender"` } type WebhookCommit struct { ID string `json:"id"` Message string `json:"message"` Added []string `json:"added"` Modified []string `json:"modified"` } // PushPayload is the body of a Forgejo "push" webhook event. type PushPayload struct { Ref string `json:"ref"` After string `json:"after"` Commits []WebhookCommit `json:"commits"` Repository WebhookRepository `json:"repository"` Pusher WebhookUser `json:"pusher"` }