Skip to content

Commit a903fdd

Browse files
committed
fix comment
1 parent 565c13a commit a903fdd

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

services/pull/merge.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,11 @@ func Merge(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.U
248248
}
249249
defer releaser()
250250
defer func() {
251-
// FIXME: This is a duplicated call to AddTestPullRequestTask in case the merge or push successfully but
252-
// the post-receive hook failed. This will ensure the test task is added.
251+
// This is a duplicated call to AddTestPullRequestTask (it will also be called by the post-receive hook, via a push queue).
252+
// This call will do some operations (push to base repo, sync commit divergence, add PR conflict check queue task, etc)
253+
// immediately instead of waiting for the "push queue"'s task. The code is from https://github.com/go-gitea/gitea/pull/7082.
254+
// But it's really questionable whether it's worth to do it ahead without waiting for the "push queue" task to run.
255+
// TODO: DUPLICATE-PR-TASK: maybe can try to remove this in 1.26 to see if there is any issue.
253256
go AddTestPullRequestTask(TestPullRequestOptions{
254257
RepoID: pr.BaseRepo.ID,
255258
Doer: doer,

services/pull/update.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ func Update(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.
6363
}
6464

6565
defer func() {
66-
// FIXME: This is a duplicated call to AddTestPullRequestTask in case the git push successfully but
67-
// the post-receive hook failed. This will ensure the test task is added.
66+
// The code is from https://github.com/go-gitea/gitea/pull/9784,
67+
// it seems a simple copy-paste from https://github.com/go-gitea/gitea/pull/7082 without a real reason.
68+
// TODO: DUPLICATE-PR-TASK: search and see another TODO comment for more details
6869
go AddTestPullRequestTask(TestPullRequestOptions{
6970
RepoID: pr.BaseRepo.ID,
7071
Doer: doer,

0 commit comments

Comments
 (0)