diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-29 02:54:38 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-29 02:54:53 +0300 |
| commit | 73d92004f50d3f5fafe64e0f9b7fddbcf4d99965 (patch) | |
| tree | 73038acf832d0595d7deca6fc26b66bc1bd0a3ff /.github/workflows/pr-gate.yml | |
| parent | a5920bee86f47023b74133dad7464b07af77ce69 (diff) | |
ci: remove approved contributor bypass
Diffstat (limited to '.github/workflows/pr-gate.yml')
| -rw-r--r-- | .github/workflows/pr-gate.yml | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index 192168ad..6d2e25be 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -23,8 +23,8 @@ jobs: 49699333, // dependabot[bot] 41898282, // github-actions[bot] ]); - const MAX_UNAPPROVED_CHANGED_FILES = 20; - const MAX_UNAPPROVED_CHANGED_LINES = 1000; + const MAX_EXTERNAL_CHANGED_FILES = 20; + const MAX_EXTERNAL_CHANGED_LINES = 1000; const REVIEW_LABELS = ['greptile-review', 'coderabbit-review']; const MAINTAINER_APPROVED_LABEL = 'maintainer-approved'; const COMMENT_MARKER = '<!-- herdr:pr-gate -->'; @@ -88,12 +88,7 @@ jobs: .filter(line => line && !line.startsWith('#'))); } - const [maintainersContent, approvedContent] = await Promise.all([ - getTextFile('.github/MAINTAINERS'), - getTextFile('.github/APPROVED_CONTRIBUTORS'), - ]); - const maintainers = parseUserList(maintainersContent); - const approvedContributors = parseUserList(approvedContent); + const maintainers = parseUserList(await getTextFile('.github/MAINTAINERS')); async function isVerifiedMaintainer(username) { if (!username || !maintainers.has(username.toLowerCase())) return false; @@ -183,11 +178,11 @@ jobs: const message = [ `Hi @${prAuthor}, thanks for your interest in contributing!`, '', - `Herdr automatically admits focused bug fixes from unapproved contributors when the title uses \`fix: ...\` or \`fix(scope): ...\` and the patch changes no more than ${MAX_UNAPPROVED_CHANGED_FILES} files and ${MAX_UNAPPROVED_CHANGED_LINES.toLocaleString('en-US')} total added or deleted lines.`, + `Herdr automatically admits focused bug fixes from contributors who are not maintainers when the title uses \`fix: ...\` or \`fix(scope): ...\` and the patch changes no more than ${MAX_EXTERNAL_CHANGED_FILES} files and ${MAX_EXTERNAL_CHANGED_LINES.toLocaleString('en-US')} total added or deleted lines.`, '', reason, '', - 'Feature requests, behavior changes, and other proposals belong in GitHub Discussions and require maintainer approval before a pull request. Membership in `.github/APPROVED_CONTRIBUTORS` bypasses this automatic intake gate, but does not grant maintainer authority or guarantee that a change will be accepted.', + 'Feature requests, behavior changes, and other proposals belong in GitHub Discussions and require maintainer approval before a pull request.', '', 'If this gate classified the pull request incorrectly, reply and tag a maintainer listed in `.github/MAINTAINERS`. A verified maintainer can reopen it; reopening by anyone else will be closed again automatically.', '', @@ -233,12 +228,6 @@ jobs: return; } - if (approvedContributors.has(prAuthor.toLowerCase())) { - core.info(`${prAuthor} is in the approved contributors list`); - await addReviewLabels(); - return; - } - if ((await currentLabels()).has(MAINTAINER_APPROVED_LABEL)) { core.info(`PR #${pullNumber} has a maintainer scope override`); await addReviewLabels(); @@ -248,13 +237,13 @@ jobs: const hasFixTitle = /^fix(?:\([^)]+\))?:\s+\S/.test(pr.title); if (!hasFixTitle) { await closePullRequest( - 'Unapproved contributors may submit only focused bug fixes. If this pull request fixes a bug, rename it to use a conventional `fix: ...` or `fix(scope): ...` title, then tag a maintainer to review and reopen it.', + 'Contributors who are not maintainers may submit only focused bug fixes. If this pull request fixes a bug, rename it to use a conventional `fix: ...` or `fix(scope): ...` title, then tag a maintainer to review and reopen it.', ); return; } - const exceedsBudget = pr.changed_files > MAX_UNAPPROVED_CHANGED_FILES || - changedLines > MAX_UNAPPROVED_CHANGED_LINES; + const exceedsBudget = pr.changed_files > MAX_EXTERNAL_CHANGED_FILES || + changedLines > MAX_EXTERNAL_CHANGED_LINES; if (exceedsBudget) { await closePullRequest('The current patch exceeds the automatic intake budget and needs maintainer alignment before review.'); return; |
