Fix Actions pull_request.paths being triggered incorrectly by rebase (#36045)
Partially fix #34710 The bug described in #34710 can be divided into two parts: `push.paths` and `pull_request.paths`. This PR fixes the issue related to `pull_request.paths`. The root cause is that the check for whether the workflow can be triggered happens **before** updating the PR’s merge base. This causes the file-change detection to use the old merge base. Therefore, we need to update the merge base first and then check whether the workflow can be triggered.
This commit is contained in:
@@ -333,7 +333,7 @@ func SubmitReview(ctx context.Context, doer *user_model.User, gitRepo *git.Repos
|
||||
if headCommitID == commitID {
|
||||
stale = false
|
||||
} else {
|
||||
stale, err = checkIfPRContentChanged(ctx, pr, commitID, headCommitID)
|
||||
stale, _, err = checkIfPRContentChanged(ctx, pr, commitID, headCommitID)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user