036f1eddc5
* Split TestPullRequest out of AddTestPullRequestTask
* Before scheduling the task, AddTestPullRequestTask stores the max
index of the repository
* When the task runs, it does not take into account pull requests that
have an index higher than the recorded max index
When AddTestPullRequestTask is called with isSync == true, it is the
direct consequence of a new commit being pushed. Forgejo knows nothing
of this new commit yet. If a PR is created later and its head
references the new commit, it will have an index that is higher and
must not be taken into account. It would be acting and triggering a
notification for a PR based on an event that happened before it
existed.
Refs: https://codeberg.org/forgejo/forgejo/issues/2009
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2236
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
(cherry picked from commit
|
||
---|---|---|
.. | ||
assignees.go | ||
assignees_test.go | ||
comment.go | ||
comment_code.go | ||
comment_list.go | ||
comment_test.go | ||
content_history.go | ||
content_history_test.go | ||
dependency.go | ||
dependency_test.go | ||
issue.go | ||
issue_index.go | ||
issue_index_test.go | ||
issue_label.go | ||
issue_label_test.go | ||
issue_list.go | ||
issue_list_test.go | ||
issue_lock.go | ||
issue_project.go | ||
issue_search.go | ||
issue_stats.go | ||
issue_test.go | ||
issue_update.go | ||
issue_user.go | ||
issue_user_test.go | ||
issue_watch.go | ||
issue_watch_test.go | ||
issue_xref.go | ||
issue_xref_test.go | ||
label.go | ||
label_test.go | ||
main_test.go | ||
milestone.go | ||
milestone_list.go | ||
milestone_test.go | ||
pull.go | ||
pull_list.go | ||
pull_test.go | ||
reaction.go | ||
reaction_test.go | ||
review.go | ||
review_list.go | ||
review_test.go | ||
stopwatch.go | ||
stopwatch_test.go | ||
tracked_time.go | ||
tracked_time_test.go |