mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
add: repository webhooks
This commit is contained in:
@@ -4,6 +4,6 @@ class Gitea::PublicKey < Gitea::Base
|
||||
|
||||
self.table_name = "public_key"
|
||||
|
||||
belongs_to :user, class_name: '::User', foreign_key: :gitea_uid, primary_key: :owner_id, optional: true
|
||||
belongs_to :user, class_name: '::User', primary_key: :gitea_uid, foreign_key: :owner_id, optional: true
|
||||
|
||||
end
|
||||
|
||||
10
app/models/gitea/webhook.rb
Normal file
10
app/models/gitea/webhook.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class Gitea::Webhook < Gitea::Base
|
||||
self.inheritance_column = nil
|
||||
|
||||
self.table_name = 'webhook'
|
||||
|
||||
belongs_to :project, class_name: "::Project", primary_key: :gpid, foreign_key: :repo_id, optional: true
|
||||
|
||||
enum hook_task_type: {gogs: 1, slack: 2, gitea: 3, discord: 4, dingtalk: 5, telegram: 6, msteams: 7, feishu: 8, matrix: 9}
|
||||
enum last_status: {waiting: 0, succeed: 1, fail: 2}
|
||||
end
|
||||
Reference in New Issue
Block a user