mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
Merge branch 'develop' into dev_trustie_server
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
|
||||
|
||||
13
app/models/gitea/webhook.rb
Normal file
13
app/models/gitea/webhook.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class Gitea::Webhook < Gitea::Base
|
||||
serialize :events, JSON
|
||||
self.inheritance_column = nil
|
||||
|
||||
self.table_name = 'webhook'
|
||||
|
||||
has_many :tasks, class_name: "Gitea::WebhookTask", foreign_key: :hook_id
|
||||
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}
|
||||
enum content_type: {json: 1, form: 2}
|
||||
end
|
||||
13
app/models/gitea/webhook_task.rb
Normal file
13
app/models/gitea/webhook_task.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class Gitea::WebhookTask < Gitea::Base
|
||||
serialize :payload_content, JSON
|
||||
serialize :request_content, JSON
|
||||
serialize :response_content, JSON
|
||||
|
||||
self.inheritance_column = nil
|
||||
|
||||
self.table_name = 'hook_task'
|
||||
|
||||
belongs_to :webhook, class_name: "Gitea::Webhook", foreign_key: :hook_id
|
||||
|
||||
enum type: {gogs: 1, slack: 2, gitea: 3, discord: 4, dingtalk: 5, telegram: 6, msteams: 7, feishu: 8, matrix: 9}
|
||||
end
|
||||
Reference in New Issue
Block a user