forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure
webhook
module (go-gitea#22256)
Previously, there was an `import services/webhooks` inside `modules/notification/webhook`. This import was removed (after fighting against many import cycles). Additionally, `modules/notification/webhook` was moved to `modules/webhook`, and a few structs/constants were extracted from `models/webhooks` to `modules/webhook`. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
- Loading branch information
1 parent
f8e93ce
commit 0f4e1b9
Showing
37 changed files
with
444 additions
and
362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright 2022 The Gitea Authors. All rights reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
package webhook | ||
|
||
// HookEvents is a set of web hook events | ||
type HookEvents struct { | ||
Create bool `json:"create"` | ||
Delete bool `json:"delete"` | ||
Fork bool `json:"fork"` | ||
Issues bool `json:"issues"` | ||
IssueAssign bool `json:"issue_assign"` | ||
IssueLabel bool `json:"issue_label"` | ||
IssueMilestone bool `json:"issue_milestone"` | ||
IssueComment bool `json:"issue_comment"` | ||
Push bool `json:"push"` | ||
PullRequest bool `json:"pull_request"` | ||
PullRequestAssign bool `json:"pull_request_assign"` | ||
PullRequestLabel bool `json:"pull_request_label"` | ||
PullRequestMilestone bool `json:"pull_request_milestone"` | ||
PullRequestComment bool `json:"pull_request_comment"` | ||
PullRequestReview bool `json:"pull_request_review"` | ||
PullRequestSync bool `json:"pull_request_sync"` | ||
Wiki bool `json:"wiki"` | ||
Repository bool `json:"repository"` | ||
Release bool `json:"release"` | ||
Package bool `json:"package"` | ||
} | ||
|
||
// HookEvent represents events that will delivery hook. | ||
type HookEvent struct { | ||
PushOnly bool `json:"push_only"` | ||
SendEverything bool `json:"send_everything"` | ||
ChooseEvents bool `json:"choose_events"` | ||
BranchFilter string `json:"branch_filter"` | ||
|
||
HookEvents `json:"events"` | ||
} |
Oops, something went wrong.