diff options
author | Jason Song <i@wolfogre.com> | 2023-01-06 19:49:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-06 19:49:14 +0800 |
commit | 3dbd2d942bc9a8609b242a64a9416fb82b564ffe (patch) | |
tree | 852dade6f073a0d0ec42f54eae19f6a4d4aaf53f /models | |
parent | f74293f9c27c65ad5c08971709128ce13299de05 (diff) | |
download | gitea-3dbd2d942bc9a8609b242a64a9416fb82b564ffe.tar.gz gitea-3dbd2d942bc9a8609b242a64a9416fb82b564ffe.zip |
Remove old HookEventType (#22358)
Supplement to #22256.
Diffstat (limited to 'models')
-rw-r--r-- | models/webhook/hooktask.go | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/models/webhook/hooktask.go b/models/webhook/hooktask.go index ccce1447bc..8688fe5de3 100644 --- a/models/webhook/hooktask.go +++ b/models/webhook/hooktask.go @@ -24,69 +24,6 @@ import ( // \___|_ / \____/ \____/|__|_ \ |____| (____ /____ >__|_ \ // \/ \/ \/ \/ \/ -// HookEventType is the type of an hook event -type HookEventType string - -// Types of hook events -const ( - HookEventCreate HookEventType = "create" - HookEventDelete HookEventType = "delete" - HookEventFork HookEventType = "fork" - HookEventPush HookEventType = "push" - HookEventIssues HookEventType = "issues" - HookEventIssueAssign HookEventType = "issue_assign" - HookEventIssueLabel HookEventType = "issue_label" - HookEventIssueMilestone HookEventType = "issue_milestone" - HookEventIssueComment HookEventType = "issue_comment" - HookEventPullRequest HookEventType = "pull_request" - HookEventPullRequestAssign HookEventType = "pull_request_assign" - HookEventPullRequestLabel HookEventType = "pull_request_label" - HookEventPullRequestMilestone HookEventType = "pull_request_milestone" - HookEventPullRequestComment HookEventType = "pull_request_comment" - HookEventPullRequestReviewApproved HookEventType = "pull_request_review_approved" - HookEventPullRequestReviewRejected HookEventType = "pull_request_review_rejected" - HookEventPullRequestReviewComment HookEventType = "pull_request_review_comment" - HookEventPullRequestSync HookEventType = "pull_request_sync" - HookEventWiki HookEventType = "wiki" - HookEventRepository HookEventType = "repository" - HookEventRelease HookEventType = "release" - HookEventPackage HookEventType = "package" -) - -// Event returns the HookEventType as an event string -func (h HookEventType) Event() string { - switch h { - case HookEventCreate: - return "create" - case HookEventDelete: - return "delete" - case HookEventFork: - return "fork" - case HookEventPush: - return "push" - case HookEventIssues, HookEventIssueAssign, HookEventIssueLabel, HookEventIssueMilestone: - return "issues" - case HookEventPullRequest, HookEventPullRequestAssign, HookEventPullRequestLabel, HookEventPullRequestMilestone, - HookEventPullRequestSync: - return "pull_request" - case HookEventIssueComment, HookEventPullRequestComment: - return "issue_comment" - case HookEventPullRequestReviewApproved: - return "pull_request_approved" - case HookEventPullRequestReviewRejected: - return "pull_request_rejected" - case HookEventPullRequestReviewComment: - return "pull_request_comment" - case HookEventWiki: - return "wiki" - case HookEventRepository: - return "repository" - case HookEventRelease: - return "release" - } - return "" -} - // HookRequest represents hook task request information. type HookRequest struct { URL string `json:"url"` |