Skip to content

Commit 61a17aa

Browse files
committed
ci: maintainer_check: Check out "merged" MAINTAINERS.yml
When a pull request is based off an old commit in the base branch (usually `main`), the MAINTAINERS file from the `pull/NUMBER/head` ref may contain out-of-date changes, and running diff between it and the MAINTAINERS file from the latest base branch may return more changes than what is actually made in the pull request. This commit updates the workflow to check out the MAINTAINERS file from the `pull/NUMBER/merge` ref, which is a temporary ref created by GitHub with the pull request commits merged into the base branch. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent ced0cc3 commit 61a17aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/maintainer_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
3333
- name: Fetch MAINTAINERS.yml from pull request
3434
run: |
35-
git fetch origin pull/${{ github.event.pull_request.number }}/head
35+
git fetch origin pull/${{ github.event.pull_request.number }}/merge
3636
git show FETCH_HEAD:MAINTAINERS.yml > pr_MAINTAINERS.yml
3737
3838
- name: Check maintainer file changes

0 commit comments

Comments
 (0)