fix(actions): run review-triggered workflows on the pull request head (#40099)

Runs triggered by pull request reviews took their ref and commit from
the review's `commit_id` instead of the pull request. They now use the
pull request head like other pull request events, and their commit
status is set on the commit that ran.
This commit is contained in:
silverwind authored and GitHub committed 2026-10-31 12:48:26 +00:00
1 parent 405ba258a8
commit b89fcf7496
5 files changed
+9 -23

No files matched your search

+2 -1
View File
@@ -1373,11 +1373,12 @@ jobs:
assert.NoError(t, err)
defer gitRepo.Close()
_, _, err = pull_service.SubmitReview(t.Context(), user4, gitRepo, pullIssue, issues_model.ReviewTypeApprove, "lgtm", sha, nil)
_, _, err = pull_service.SubmitReview(t.Context(), user4, gitRepo, pullIssue, issues_model.ReviewTypeApprove, "lgtm", addWorkflow.Commit.SHA, nil)
assert.NoError(t, err)
// verify that a commit status was created for the review event
waitCommitStatusAndInsertFakeStatus(t, repo, sha)
assert.Equal(t, sha, unittest.AssertExistsAndLoadBean(t, &actions_model.ActionRun{RepoID: repo.ID}).CommitSHA)
})
}