From a4cc37b46a937a1e558f9faab565a7cf12638f67 Mon Sep 17 00:00:00 2001 From: Gusted Date: Thu, 14 Mar 2024 16:15:56 +0100 Subject: [PATCH] [BUG] Use correct headcommitid Regression of #2507, which switched the HEAD from `pr.GetGitRefName()` to `pr.HeadCommitID` but it had to be `prInfo.HeadCommitID`. Resolves #2656 I was able to reproduce this locally with _some_ pull requests, haven't been able to get a reproducer trough integration testing. --- models/issues/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/issues/pull.go b/models/issues/pull.go index a2c116c4c0..f1baa9b5e5 100644 --- a/models/issues/pull.go +++ b/models/issues/pull.go @@ -932,7 +932,7 @@ func PullRequestCodeOwnersReview(ctx context.Context, pull *Issue, pr *PullReque } // Use the merge base as the base instead of the main branch to avoid problems // if the pull request is out of date with the base branch. - changedFiles, err := repo.GetFilesChangedBetween(prInfo.MergeBase, pr.HeadCommitID) + changedFiles, err := repo.GetFilesChangedBetween(prInfo.MergeBase, prInfo.HeadCommitID) if err != nil { return err }