-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add user webhooks #21563
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
Merged
Add user webhooks #21563
Changes from 10 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
a3c56ac
Add user webhooks.
KN4CK3R fb2df43
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 2b9459c
Add migration.
KN4CK3R 2c1cb14
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R e4e51a3
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 9960582
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 989da06
lint
KN4CK3R 9cee676
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 0ddb01f
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 502888b
Fix fixture.
KN4CK3R 6a4543a
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 7cf0e95
Add suggestions.
KN4CK3R 6bb8d13
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 21e481b
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R bc0284f
Fix migration.
KN4CK3R 5ebaf78
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 78772e1
fmt
KN4CK3R 42f710e
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R ebd031e
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 381162a
Merge branch 'main' into feature-user-webhooks
zeripath 08ec5d8
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 3fe01b6
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 530f094
Merge branch 'main' into feature-user-webhooks
lunny 3dedb26
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R a6d42d9
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 8703215
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 4bf1491
Use new database checks.
KN4CK3R 5f580eb
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 8973f99
Fix column name in new methods.
KN4CK3R 5c577dd
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
KN4CK3R 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
|
||
- | ||
id: 3 | ||
org_id: 3 | ||
owner_id: 3 | ||
repo_id: 3 | ||
url: www.example.com/url3 | ||
content_type: 1 # json | ||
|
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,37 @@ | ||
// Copyright 2022 The Gitea Authors. All rights reserved. | ||
// Use of this source code is governed by a MIT-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package v1_19 //nolint | ||
|
||
import ( | ||
"code.gitea.io/gitea/models/migrations/base" | ||
|
||
"xorm.io/xorm" | ||
) | ||
|
||
func RenameWebhookOrgToOwner(x *xorm.Engine) error { | ||
type Webhook struct { | ||
ID int64 `xorm:"pk autoincr"` | ||
OrgID int64 | ||
OwnerID int64 `xorm:"INDEX"` | ||
} | ||
|
||
sess := x.NewSession() | ||
defer sess.Close() | ||
if err := sess.Begin(); err != nil { | ||
return err | ||
} | ||
|
||
if err := sess.Sync2(new(Webhook)); err != nil { | ||
return err | ||
} | ||
if _, err := sess.Exec("UPDATE webhook SET owner_id = org_id"); err != nil { | ||
return err | ||
} | ||
if err := base.DropTableColumns(sess, "webhook", "org_id"); err != nil { | ||
return err | ||
} | ||
|
||
return sess.Commit() | ||
} |
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
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.