Clarify explicit contribution permission

This commit is contained in:
Gregory Schier
2026-06-30 14:36:46 -07:00
parent 8724260eb4
commit 6f52bb7533
4 changed files with 28 additions and 33 deletions
+2 -2
View File
@@ -5,12 +5,12 @@
## Submission ## Submission
- [ ] This PR is a bug fix or small-scope improvement. - [ ] This PR is a bug fix or small-scope improvement.
- [ ] If this PR is not a bug fix or small-scope improvement, I linked an approved feedback item below. - [ ] 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.
- [ ] I have read and followed [`CONTRIBUTING.md`](CONTRIBUTING.md). - [ ] I have read and followed [`CONTRIBUTING.md`](CONTRIBUTING.md).
- [ ] I tested this change locally. - [ ] I tested this change locally.
- [ ] I added or updated tests when reasonable. - [ ] I added or updated tests when reasonable.
Approved feedback item (required if not a bug fix or small-scope improvement): Explicit permission feedback item (required if not a bug fix or small-scope improvement):
<!-- https://yaak.app/feedback/... --> <!-- https://yaak.app/feedback/... -->
+24 -29
View File
@@ -20,20 +20,22 @@ const LABELS = {
color: "B60205", color: "B60205",
description: "Community PR does not match Yaak's contribution policy.", description: "Community PR does not match Yaak's contribution policy.",
}, },
approvedFeedback: { explicitPermission: {
name: "contribution: approved feedback", name: "contribution: explicit permission",
color: "5319E7", color: "5319E7",
description: "Community PR links an approved feedback item.", description:
"Community PR links feedback where @gschier explicitly allowed the work.",
}, },
needsTemplate: { needsTemplate: {
name: "contribution: needs template", name: "contribution: needs template",
color: "D93F0B", color: "D93F0B",
description: "Community PR needs a completed pull request template.", description: "Community PR needs a completed pull request template.",
}, },
needsApproval: { needsPermission: {
name: "contribution: needs approval", name: "contribution: needs permission",
color: "B60205", color: "B60205",
description: "Community PR needs an approved feedback item before review.", description:
"Community PR needs feedback showing explicit permission from @gschier.",
}, },
needsScopeReview: { needsScopeReview: {
name: "contribution: needs scope review", name: "contribution: needs scope review",
@@ -43,21 +45,14 @@ const LABELS = {
}, },
}; };
const LEGACY_MANAGED_LABEL_NAMES = [
"contribution: accepted",
"contribution: large diff",
];
const MANAGED_LABEL_NAMES = [ const MANAGED_LABEL_NAMES = [
...new Set([ ...new Set(Object.values(LABELS).map((label) => label.name)),
...Object.values(LABELS).map((label) => label.name),
...LEGACY_MANAGED_LABEL_NAMES,
]),
]; ];
const CHECKBOXES = { const CHECKBOXES = {
smallScope: "This PR is a bug fix or small-scope improvement.", smallScope: "This PR is a bug fix or small-scope improvement.",
approvedFeedback: explicitPermission:
"If this PR is not a bug fix or small-scope improvement, I linked an approved feedback item below.", "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.",
readContributing: readContributing:
"I have read and followed [`CONTRIBUTING.md`](CONTRIBUTING.md).", "I have read and followed [`CONTRIBUTING.md`](CONTRIBUTING.md).",
testedLocally: "I tested this change locally.", testedLocally: "I tested this change locally.",
@@ -195,7 +190,7 @@ function analyzePullRequest(pr) {
const hasSummary = hasMeaningfulText(summary); const hasSummary = hasMeaningfulText(summary);
const feedbackUrl = findFeedbackUrl(body); const feedbackUrl = findFeedbackUrl(body);
const smallScope = states.smallScope === true; const smallScope = states.smallScope === true;
const approvedFeedback = states.approvedFeedback === true; const explicitPermission = states.explicitPermission === true;
if (!hasSummary) { if (!hasSummary) {
blockers.push({ blockers.push({
@@ -204,23 +199,23 @@ function analyzePullRequest(pr) {
}); });
} }
if (smallScope && approvedFeedback) { if (smallScope && explicitPermission) {
blockers.push({ blockers.push({
label: LABELS.needsTemplate.name, label: LABELS.needsTemplate.name,
message: message:
"Choose either the small-scope checkbox or the approved-feedback checkbox, not both.", "Choose either the small-scope checkbox or the explicit-permission checkbox, not both.",
}); });
} else if (!smallScope && !approvedFeedback) { } else if (!smallScope && !explicitPermission) {
blockers.push({ blockers.push({
label: LABELS.needsTemplate.name, label: LABELS.needsTemplate.name,
message: message:
"Check whether this is a bug fix or small-scope improvement, or confirm that an approved feedback item is linked.", "Check whether this is a bug fix or small-scope improvement, or confirm that explicit permission from @gschier is linked.",
}); });
} else if (approvedFeedback && feedbackUrl == null) { } else if (explicitPermission && feedbackUrl == null) {
blockers.push({ blockers.push({
label: LABELS.needsApproval.name, label: LABELS.needsPermission.name,
message: message:
"Link the approved feedback item where contribution approval was explicitly stated.", "Link the feedback item where @gschier explicitly gave you permission to work on this.",
}); });
} }
@@ -252,8 +247,8 @@ function analyzePullRequest(pr) {
desiredLabels.add( desiredLabels.add(
largeDiff largeDiff
? LABELS.needsScopeReview.name ? LABELS.needsScopeReview.name
: states.approvedFeedback : states.explicitPermission
? LABELS.approvedFeedback.name ? LABELS.explicitPermission.name
: LABELS.inScope.name, : LABELS.inScope.name,
); );
} else if ( } else if (
@@ -278,7 +273,7 @@ function analyzePullRequest(pr) {
function buildBlockingComment(analysis) { function buildBlockingComment(analysis) {
const lines = [ const lines = [
COMMENT_MARKER, COMMENT_MARKER,
"Thanks for the PR. Yaak currently accepts community PRs for bug fixes and small-scope improvements, plus larger changes that link an approved feedback item from https://yaak.app/feedback.", "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.",
"", "",
"This PR cannot be accepted yet. Please update the PR description to address:", "This PR cannot be accepted yet. Please update the PR description to address:",
"", "",
@@ -314,9 +309,9 @@ function buildOutOfScopeComment() {
COMMENT_MARKER, COMMENT_MARKER,
"Thanks for the PR. This does not appear to match Yaak's current contribution policy.", "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 maintainer-reviewed feedback item from https://yaak.app/feedback.", "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.",
"", "",
"If this PR is tied to a feedback item where contribution approval was explicitly stated, please link it in the PR description.", "If this PR is tied to a feedback item where @gschier explicitly gave permission, please link it in the PR description.",
].join("\n"); ].join("\n");
} }
+1 -1
View File
@@ -9,7 +9,7 @@ Pull requests that introduce broad new features, major redesigns, or large refac
## Approval for Non-Bugfix Changes ## Approval for Non-Bugfix Changes
If your PR is not a bug fix or small-scope improvement, include a link to the approved [feedback item](https://yaak.app/feedback) where contribution approval was explicitly stated. 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.
## Development Setup ## Development Setup
+1 -1
View File
@@ -58,7 +58,7 @@ Built with [Tauri](https://tauri.app), Rust, and React, its fast, lightweight
> [!IMPORTANT] > [!IMPORTANT]
> Community PRs are currently limited to bug fixes and small-scope improvements. > Community PRs are currently limited to bug fixes and small-scope improvements.
> If your PR is out of scope, link an approved feedback item from [yaak.app/feedback](https://yaak.app/feedback). > 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.
> See [`CONTRIBUTING.md`](CONTRIBUTING.md) for policy details and [`DEVELOPMENT.md`](DEVELOPMENT.md) for local setup. > See [`CONTRIBUTING.md`](CONTRIBUTING.md) for policy details and [`DEVELOPMENT.md`](DEVELOPMENT.md) for local setup.
## Useful Resources ## Useful Resources