mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-03 11:31:47 +02:00
Limit community PR policy to bug fixes
This commit is contained in:
@@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
## Submission
|
## Submission
|
||||||
|
|
||||||
- [ ] This PR is a bug fix or small-scope improvement.
|
- [ ] This PR is a bug fix.
|
||||||
- [ ] 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.
|
||||||
- [ ] 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.
|
||||||
|
|
||||||
Explicit permission feedback item (required if not a bug fix or small-scope improvement):
|
Explicit permission feedback item (required if not a bug fix):
|
||||||
|
|
||||||
<!-- https://yaak.app/feedback/... -->
|
<!-- https://yaak.app/feedback/... -->
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const LABELS = {
|
|||||||
name: "contribution: needs scope review",
|
name: "contribution: needs scope review",
|
||||||
color: "FBCA04",
|
color: "FBCA04",
|
||||||
description:
|
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 = {
|
const CHECKBOXES = {
|
||||||
smallScope: "This PR is a bug fix or small-scope improvement.",
|
bugFix: "This PR is a bug fix.",
|
||||||
explicitPermission:
|
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:
|
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.",
|
||||||
@@ -191,27 +191,28 @@ function analyzePullRequest(pr) {
|
|||||||
const summary = getSection(body, "Summary");
|
const summary = getSection(body, "Summary");
|
||||||
const hasSummary = hasMeaningfulText(summary);
|
const hasSummary = hasMeaningfulText(summary);
|
||||||
const feedbackUrl = findFeedbackUrl(body);
|
const feedbackUrl = findFeedbackUrl(body);
|
||||||
const smallScope = states.smallScope === true;
|
const bugFix = states.bugFix === true;
|
||||||
const explicitPermission = states.explicitPermission === true;
|
const explicitPermission = states.explicitPermission === true;
|
||||||
|
|
||||||
if (!hasSummary) {
|
if (!hasSummary) {
|
||||||
blockers.push({
|
blockers.push({
|
||||||
label: LABELS.needsTemplate.name,
|
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({
|
blockers.push({
|
||||||
label: LABELS.needsTemplate.name,
|
label: LABELS.needsTemplate.name,
|
||||||
message:
|
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({
|
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 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) {
|
} else if (explicitPermission && feedbackUrl == null) {
|
||||||
blockers.push({
|
blockers.push({
|
||||||
@@ -275,7 +276,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 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:",
|
"This PR cannot be accepted yet because the following contribution policy requirements were unmet:",
|
||||||
"",
|
"",
|
||||||
@@ -326,7 +327,7 @@ 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 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.",
|
"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
-2
@@ -3,13 +3,12 @@
|
|||||||
Yaak accepts community pull requests for:
|
Yaak accepts community pull requests for:
|
||||||
|
|
||||||
- Bug fixes
|
- 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.
|
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
|
## 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
|
## Development Setup
|
||||||
|
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ Built with [Tauri](https://tauri.app), Rust, and React, it’s fast, lightweight
|
|||||||
## Contribution Policy
|
## Contribution Policy
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Community PRs are currently limited to bug fixes and small-scope improvements.
|
> Community PRs are currently limited to bug fixes.
|
||||||
> 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.
|
> 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.
|
> See [`CONTRIBUTING.md`](CONTRIBUTING.md) for policy details and [`DEVELOPMENT.md`](DEVELOPMENT.md) for local setup.
|
||||||
|
|
||||||
## Useful Resources
|
## Useful Resources
|
||||||
|
|||||||
Reference in New Issue
Block a user