Skip to content

Commit 7a12876

Browse files
fix(workflows): skip maintainer gate for maintainer-authored PRs (#17)
author_association only reports MEMBER for public org membership; with private membership a maintainer's own PR could never clear the gate (authors cannot approve their own PRs). Skip when the PR author is in MAINTAINERS. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 5cbfd09 commit 7a12876

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/require-maintainer-approval.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ jobs:
2727
script: |
2828
const MAINTAINERS = ['imran-siddique'];
2929
30+
const author = context.payload.pull_request.user.login;
31+
if (MAINTAINERS.includes(author)) {
32+
core.info(`Author ${author} is a maintainer, skipping gate`);
33+
return;
34+
}
35+
3036
const association = context.payload.pull_request.author_association;
3137
if (association === 'MEMBER' || association === 'OWNER') {
3238
core.info(`Author is ${association}, skipping gate`);

0 commit comments

Comments
 (0)