新增:存储pull_request源仓库信息

This commit is contained in:
2024-07-19 11:17:15 +08:00
parent f9e7dafefd
commit c9df8fa3fe
7 changed files with 50 additions and 28 deletions

View File

@@ -217,6 +217,10 @@ class ProjectsController < ApplicationController
new_project_params = project_params.except(:private).merge(is_public: !private)
@project.update_attributes!(new_project_params)
fork_pull_requests = PullRequest.where(fork_project_id: @project.id)
if fork_pull_requests.present?
fork_pull_requests.update_all(fork_project_identifier: @project.identifier)
end
@project.forked_projects.map{|p| p.update!(is_public: @project.is_public)}
gitea_params = {
private: private,