File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1057,6 +1057,7 @@ func MergePullRequest(ctx *context.APIContext) {
10571057 }
10581058 log .Trace ("Pull request merged: %d" , pr .ID )
10591059
1060+ // for agit flow, we should not delete the agit reference after merge
10601061 if form .DeleteBranchAfterMerge && pr .Flow == issues_model .PullRequestFlowGithub {
10611062 // check permission even it has been checked in repo_service.DeleteBranch so that we don't need to
10621063 // do RetargetChildrenOnMerge
Original file line number Diff line number Diff line change @@ -1403,7 +1403,7 @@ func CleanUpPullRequest(ctx *context.Context) {
14031403
14041404 pr := issue .PullRequest
14051405
1406- // Don't cleanup unmerged and unclosed PRs
1406+ // Don't cleanup unmerged and unclosed PRs and agit PRs
14071407 if ! pr .HasMerged && ! issue .IsClosed && pr .Flow != issues_model .PullRequestFlowGithub {
14081408 ctx .NotFound ("CleanUpPullRequest" , nil )
14091409 return
You can’t perform that action at this time.
0 commit comments