mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-16 01:35:56 +08:00
FIx code review
This commit is contained in:
@@ -3,5 +3,8 @@ class Ci::RemoteBase < ApplicationRecord
|
||||
|
||||
establish_connection Rails.configuration.database_configuration[Rails.env]["ci_server_db"]
|
||||
|
||||
|
||||
def generate_code
|
||||
[*'a'..'z',*'0'..'9',*'A'..'Z'].sample(32).join
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -16,11 +16,13 @@ class Ci::Repo < Ci::RemoteBase
|
||||
[user, repo]
|
||||
end
|
||||
|
||||
def enable
|
||||
def config_trustie_pipeline
|
||||
update_column(:repo_config, '.trustie-pipeline.yml')
|
||||
end
|
||||
|
||||
def activate
|
||||
|
||||
# repo_active、repo_signer、repo_secret、repo_updated
|
||||
update_columns(repo_active: 1, repo_signer: generate_code, repo_secret: generate_code, repo_updated: Time.now.to_i)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user