From 78b3996f47cd0bf75c7db79527964b65103be4ca Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 30 Jun 2026 15:05:31 -0700 Subject: [PATCH] Limit community PR policy to bug fixes --- .github/pull_request_template.md | 6 ++--- .github/scripts/check-contribution-policy.js | 23 ++++++++++---------- CONTRIBUTING.md | 3 +-- README.md | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a02c3641..50c4f811 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,13 +4,13 @@ ## Submission -- [ ] This PR is a bug fix or small-scope improvement. -- [ ] If this PR is not a bug fix or small-scope improvement, I linked the feedback item where @gschier explicitly gave me permission to work on it. +- [ ] This PR is a bug fix. +- [ ] If this PR is not a bug fix, I linked the feedback item where @gschier explicitly gave me permission to work on it. - [ ] I have read and followed [`CONTRIBUTING.md`](CONTRIBUTING.md). - [ ] I tested this change locally. - [ ] I added or updated tests when reasonable. -Explicit permission feedback item (required if not a bug fix or small-scope improvement): +Explicit permission feedback item (required if not a bug fix): diff --git a/.github/scripts/check-contribution-policy.js b/.github/scripts/check-contribution-policy.js index 1a7926fd..85c38661 100644 --- a/.github/scripts/check-contribution-policy.js +++ b/.github/scripts/check-contribution-policy.js @@ -43,7 +43,7 @@ const LABELS = { name: "contribution: needs scope review", color: "FBCA04", description: - "Community PR may be broader than Yaak's small-scope contribution policy.", + "Community PR may be broader than Yaak's bug-fix contribution policy.", }, }; @@ -52,9 +52,9 @@ const MANAGED_LABEL_NAMES = [ ]; const CHECKBOXES = { - smallScope: "This PR is a bug fix or small-scope improvement.", + bugFix: "This PR is a bug fix.", explicitPermission: - "If this PR is not a bug fix or small-scope improvement, I linked the feedback item where @gschier explicitly gave me permission to work on it.", + "If this PR is not a bug fix, I linked the feedback item where @gschier explicitly gave me permission to work on it.", readContributing: "I have read and followed [`CONTRIBUTING.md`](CONTRIBUTING.md).", testedLocally: "I tested this change locally.", @@ -191,27 +191,28 @@ function analyzePullRequest(pr) { const summary = getSection(body, "Summary"); const hasSummary = hasMeaningfulText(summary); const feedbackUrl = findFeedbackUrl(body); - const smallScope = states.smallScope === true; + const bugFix = states.bugFix === true; const explicitPermission = states.explicitPermission === true; if (!hasSummary) { blockers.push({ label: LABELS.needsTemplate.name, - message: "Add a short summary describing the bug fix or improvement.", + message: + "Add a short summary describing the bug fix or permitted change.", }); } - if (smallScope && explicitPermission) { + if (bugFix && explicitPermission) { blockers.push({ label: LABELS.needsTemplate.name, message: - "Choose either the small-scope checkbox or the explicit-permission checkbox, not both.", + "Choose either the bug-fix checkbox or the explicit-permission checkbox, not both.", }); - } else if (!smallScope && !explicitPermission) { + } else if (!bugFix && !explicitPermission) { blockers.push({ label: LABELS.needsTemplate.name, message: - "Check whether this is a bug fix or small-scope improvement, or confirm that explicit permission from @gschier is linked.", + "Check whether this is a bug fix, or confirm that explicit permission from @gschier is linked.", }); } else if (explicitPermission && feedbackUrl == null) { blockers.push({ @@ -275,7 +276,7 @@ function analyzePullRequest(pr) { function buildBlockingComment(analysis) { const lines = [ COMMENT_MARKER, - "Thanks for the PR. Yaak currently accepts community PRs for bug fixes and small-scope improvements, plus larger changes that link a feedback item where @gschier explicitly gave permission to work on it.", + "Thanks for the PR. Yaak currently accepts community PRs for bug fixes, plus larger changes that link a feedback item where @gschier explicitly gave permission to work on it.", "", "This PR cannot be accepted yet because the following contribution policy requirements were unmet:", "", @@ -326,7 +327,7 @@ function buildOutOfScopeComment() { COMMENT_MARKER, "Thanks for the PR. This does not appear to match Yaak's current contribution policy.", "", - "Yaak currently accepts community PRs for bug fixes, small-scope improvements, or changes tied to a feedback item where @gschier explicitly gave permission to work on it.", + "Yaak currently accepts community PRs for bug fixes, or changes tied to a feedback item where @gschier explicitly gave permission to work on it.", "", "If this PR is tied to a feedback item where @gschier explicitly gave permission, please link it in the PR description.", ].join("\n"); diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dea8373a..d8b23a8d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,13 +3,12 @@ Yaak accepts community pull requests for: - Bug fixes -- Small-scope improvements directly tied to existing behavior Pull requests that introduce broad new features, major redesigns, or large refactors are out of scope unless explicitly approved first. ## Approval for Non-Bugfix Changes -If your PR is not a bug fix or small-scope improvement, include a link to the [feedback item](https://yaak.app/feedback) where @gschier explicitly gave you permission to work on it. +If your PR is not a bug fix, include a link to the [feedback item](https://yaak.app/feedback) where @gschier explicitly gave you permission to work on it. ## Development Setup diff --git a/README.md b/README.md index d56de408..f7697fbb 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,8 @@ Built with [Tauri](https://tauri.app), Rust, and React, it’s fast, lightweight ## Contribution Policy > [!IMPORTANT] -> Community PRs are currently limited to bug fixes and small-scope improvements. -> If your PR is out of scope, link the [feedback item](https://yaak.app/feedback) where @gschier explicitly gave you permission to work on it. +> Community PRs are currently limited to bug fixes. +> If your PR is not a bug fix, link the [feedback item](https://yaak.app/feedback) where @gschier explicitly gave you permission to work on it. > See [`CONTRIBUTING.md`](CONTRIBUTING.md) for policy details and [`DEVELOPMENT.md`](DEVELOPMENT.md) for local setup. ## Useful Resources