-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Restructure webhook
module
#22256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lunny
merged 25 commits into
go-gitea:main
from
delvh:maintenance/move-webhook-type-to-modules
Jan 1, 2023
Merged
Restructure webhook
module
#22256
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
4f4104a
Remove "import services" for webhook module
delvh 39b8b27
Run formatter
delvh 3a2d64d
Fix oversights
delvh a669ba4
Fix tests
delvh 16cc5a5
… and the remaining test as well as the formatter again
delvh 44e1ffe
mv modules/notification/webhook -> modules/webhook
delvh bfa2c35
Change import also in missed tests
delvh e43911d
Format again
delvh d0244b8
Merge branch 'main' into maintenance/move-webhook-type-to-modules
6543 a3401d5
Remove tags file from gitignore
delvh 529b532
Move webhook errors back to models
delvh 17b33d2
Merge branch 'main' into maintenance/move-webhook-type-to-modules
delvh ae85520
Run formatter… again
delvh 40c7cde
Move Webhook status constants also to modules
delvh 66882ea
Merge branch 'main' into maintenance/move-webhook-type-to-modules
delvh 0fc541b
Fix tests
delvh 927b08f
Remove comment as the linter complains about it
delvh 9964308
Remove dependence of migration v233 on a custom type
delvh 469ea8d
Merge branch 'main' into maintenance/move-webhook-type-to-modules
lunny e17b383
Merge branch 'main' into maintenance/move-webhook-type-to-modules
delvh 8bb9921
Merge branch 'main' into maintenance/move-webhook-type-to-modules
lunny db7db12
Move ToHook to ../webhook to prevent an import cycle and a new package
delvh 5cc5cb0
Merge branch 'main' into maintenance/move-webhook-type-to-modules
lunny 1be6ff0
Merge branch 'main' into maintenance/move-webhook-type-to-modules
lunny 72098fd
Merge branch 'main' into maintenance/move-webhook-type-to-modules
lunny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.