Skip to content

Commit 7b44f35

Browse files
committed
Add some comments
1 parent cf1d71a commit 7b44f35

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

routers/api/v1/repo/pull.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

routers/web/repo/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)