mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
[FIX]org sync gitea_uid
[FIX]
This commit is contained in:
@@ -14,7 +14,7 @@ class Organizations::CreateService < ApplicationService
|
||||
create_org_and_extension
|
||||
create_owner_info
|
||||
create_gitea_org
|
||||
sync_owner_team_gtid
|
||||
sync_gitea_info
|
||||
|
||||
Rails.logger.info("######Organization create_service end######")
|
||||
end
|
||||
@@ -66,7 +66,8 @@ class Organizations::CreateService < ApplicationService
|
||||
@gitea_organization = Gitea::Organization::CreateService.call(@organization.gitea_token, organization)
|
||||
end
|
||||
|
||||
def sync_owner_team_gtid
|
||||
def sync_gitea_info
|
||||
organization.update!(gitea_uid: gitea_organization["id"])
|
||||
owner_team.update!(gtid: gitea_organization["owner_team"]["id"])
|
||||
end
|
||||
end
|
||||
@@ -13,7 +13,6 @@ class Repositories::CreateService < ApplicationService
|
||||
ActiveRecord::Base.transaction do
|
||||
if repository.save!
|
||||
create_gitea_repository
|
||||
create_manager_member
|
||||
sync_project
|
||||
sync_repository
|
||||
# if project.project_type == "common"
|
||||
@@ -49,6 +48,7 @@ class Repositories::CreateService < ApplicationService
|
||||
next unless team.includes_all_project
|
||||
TeamProject.build(project.user_id, team.id, project.id)
|
||||
end
|
||||
create_manager_member
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user