From ba2889faf82cee892a082d9a16a8a9118f2bbe6c Mon Sep 17 00:00:00 2001 From: Richard Tang Date: Tue, 27 Jan 2026 16:26:19 -0800 Subject: [PATCH] chore: allow excluding doc PRs --- .github/workflows/pr-requirements.yml | 16 +++++++++++----- CONTRIBUTING.md | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-requirements.yml b/.github/workflows/pr-requirements.yml index 6e52ce8f..0b4be8cf 100644 --- a/.github/workflows/pr-requirements.yml +++ b/.github/workflows/pr-requirements.yml @@ -22,10 +22,12 @@ jobs: const prTitle = pr.title || ''; const prLabels = (pr.labels || []).map(l => l.name); - // Allow micro-fix PRs without a linked issue + // Allow micro-fix and documentation PRs without a linked issue const isMicroFix = prLabels.includes('micro-fix') || /micro-fix/i.test(prTitle); - if (isMicroFix) { - console.log(`PR #${prNumber} is a Micro-fix, skipping issue requirement.`); + const isDocumentation = prLabels.includes('documentation') || /\bdocs?\b/i.test(prTitle); + if (isMicroFix || isDocumentation) { + const reason = isMicroFix ? 'micro-fix' : 'documentation'; + console.log(`PR #${prNumber} is a ${reason}, skipping issue requirement.`); return; } @@ -52,7 +54,9 @@ jobs: 2. Assign yourself to the issue 3. Re-open this PR and add \`Fixes #123\` in the description - **Exception:** If this is a micro-fix, add the \`micro-fix\` label or include \`micro-fix\` in the PR title to bypass this requirement. + **Exception:** To bypass this requirement, you can: + - Add the \`micro-fix\` label or include \`micro-fix\` in your PR title for trivial fixes + - Add the \`documentation\` label or include \`doc\`/\`docs\` in your PR title for documentation changes **Why is this required?** See #472 for details.`; @@ -133,7 +137,9 @@ jobs: 1. Assign yourself (@${prAuthor}) to one of the linked issues 2. Re-open this PR - **Exception:** If this is a micro-fix, add the \`micro-fix\` label or include \`micro-fix\` in the PR title to bypass this requirement. + **Exception:** To bypass this requirement, you can: + - Add the \`micro-fix\` label or include \`micro-fix\` in your PR title for trivial fixes + - Add the \`documentation\` label or include \`doc\`/\`docs\` in your PR title for documentation changes **Why is this required?** See #472 for details.`; diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9d8466f2..02f84ab5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,8 +30,8 @@ To keep the project moving, issues with **no activity for 5 days** (no PR or sta ### Exceptions (No Assignment Needed) You may submit PRs without prior assignment for: -- **Documentation:** Fixing typos or clarifying instructions -- **Micro-fixes:** Minor tweaks or obvious linting errors +- **Documentation:** Fixing typos or clarifying instructions — add the `documentation` label or include `doc`/`docs` in your PR title to bypass the linked issue requirement +- **Micro-fixes:** Minor tweaks or obvious linting errors — add the `micro-fix` label or include `micro-fix` in your PR title to bypass the linked issue requirement - **Small Refactors:** Tiny improvements that don't change core logic If a high-quality PR is submitted for a "stale" assigned issue (no activity for 7+ days), we may proceed with the submitted code.