mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
新增:同步时间和创建数据返回
This commit is contained in:
@@ -3,7 +3,7 @@ class Api::V1::Projects::SyncRepositories::CreateService < ApplicationService
|
||||
include ActiveModel::Model
|
||||
|
||||
attr_reader :project, :type, :external_token, :external_repo_address, :sync_granularity, :external_branch_name, :gitlink_branch_name, :first_sync_direction
|
||||
attr_accessor :sync_repository1, :sync_repository2
|
||||
attr_accessor :sync_repository1, :sync_repository2, :sync_repository_branch1, :sync_repository_branch2
|
||||
|
||||
validates :type, inclusion: {in: %w(SyncRepositories::Gitee SyncRepositories::Github)}
|
||||
validates :external_repo_address, format: { with: CustomRegexp::URL_REGEX, multiline: true, message: "地址格式不正确" }
|
||||
@@ -36,6 +36,8 @@ class Api::V1::Projects::SyncRepositories::CreateService < ApplicationService
|
||||
touch_first_sync
|
||||
end
|
||||
create_webhook
|
||||
|
||||
[@sync_repository1, @sync_repository2, @sync_repository_branch1, @sync_repository_branch2]
|
||||
end
|
||||
|
||||
def check_gitlink_branch_name
|
||||
|
||||
Reference in New Issue
Block a user