mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-04 03:51:44 +02:00
Clarify blocked contribution labels
This commit is contained in:
@@ -28,16 +28,17 @@ const LABELS = {
|
|||||||
description:
|
description:
|
||||||
"Community PR links feedback where @gschier explicitly allowed the work.",
|
"Community PR links feedback where @gschier explicitly allowed the work.",
|
||||||
},
|
},
|
||||||
needsTemplate: {
|
missingTemplate: {
|
||||||
name: "contribution: needs template",
|
name: "contribution: missing template",
|
||||||
color: "D93F0B",
|
color: "D93F0B",
|
||||||
description: "Community PR needs a completed pull request template.",
|
description:
|
||||||
|
"Community PR is missing enough of the pull request template to review.",
|
||||||
},
|
},
|
||||||
needsPermission: {
|
policyUnmet: {
|
||||||
name: "contribution: needs permission",
|
name: "contribution: policy unmet",
|
||||||
color: "B60205",
|
color: "B60205",
|
||||||
description:
|
description:
|
||||||
"Community PR needs feedback showing explicit permission from @gschier.",
|
"Community PR does not currently satisfy the contribution policy.",
|
||||||
},
|
},
|
||||||
needsScopeReview: {
|
needsScopeReview: {
|
||||||
name: "contribution: needs scope review",
|
name: "contribution: needs scope review",
|
||||||
@@ -183,7 +184,7 @@ function analyzePullRequest(pr) {
|
|||||||
|
|
||||||
if (!templateUsed) {
|
if (!templateUsed) {
|
||||||
blockers.push({
|
blockers.push({
|
||||||
label: LABELS.needsTemplate.name,
|
label: LABELS.missingTemplate.name,
|
||||||
message:
|
message:
|
||||||
"Update the PR description with the repository pull request template.",
|
"Update the PR description with the repository pull request template.",
|
||||||
});
|
});
|
||||||
@@ -196,7 +197,7 @@ function analyzePullRequest(pr) {
|
|||||||
|
|
||||||
if (!hasSummary) {
|
if (!hasSummary) {
|
||||||
blockers.push({
|
blockers.push({
|
||||||
label: LABELS.needsTemplate.name,
|
label: LABELS.policyUnmet.name,
|
||||||
message:
|
message:
|
||||||
"Add a short summary describing the bug fix or permitted change.",
|
"Add a short summary describing the bug fix or permitted change.",
|
||||||
});
|
});
|
||||||
@@ -204,19 +205,19 @@ function analyzePullRequest(pr) {
|
|||||||
|
|
||||||
if (bugFix && explicitPermission) {
|
if (bugFix && explicitPermission) {
|
||||||
blockers.push({
|
blockers.push({
|
||||||
label: LABELS.needsTemplate.name,
|
label: LABELS.policyUnmet.name,
|
||||||
message:
|
message:
|
||||||
"Choose either the bug-fix checkbox or the explicit-permission checkbox, not both.",
|
"Choose either the bug-fix checkbox or the explicit-permission checkbox, not both.",
|
||||||
});
|
});
|
||||||
} else if (!bugFix && !explicitPermission) {
|
} else if (!bugFix && !explicitPermission) {
|
||||||
blockers.push({
|
blockers.push({
|
||||||
label: LABELS.needsTemplate.name,
|
label: LABELS.policyUnmet.name,
|
||||||
message:
|
message:
|
||||||
"Check whether this is a bug fix, 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({
|
||||||
label: LABELS.needsPermission.name,
|
label: LABELS.policyUnmet.name,
|
||||||
message:
|
message:
|
||||||
"Link the feedback item where @gschier explicitly gave you permission to work on this.",
|
"Link the feedback item where @gschier explicitly gave you permission to work on this.",
|
||||||
});
|
});
|
||||||
@@ -224,21 +225,21 @@ function analyzePullRequest(pr) {
|
|||||||
|
|
||||||
if (states.readContributing !== true) {
|
if (states.readContributing !== true) {
|
||||||
blockers.push({
|
blockers.push({
|
||||||
label: LABELS.needsTemplate.name,
|
label: LABELS.policyUnmet.name,
|
||||||
message: "Confirm that `CONTRIBUTING.md` was read and followed.",
|
message: "Confirm that `CONTRIBUTING.md` was read and followed.",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (states.testedLocally !== true) {
|
if (states.testedLocally !== true) {
|
||||||
blockers.push({
|
blockers.push({
|
||||||
label: LABELS.needsTemplate.name,
|
label: LABELS.policyUnmet.name,
|
||||||
message: "Confirm that the change was tested locally.",
|
message: "Confirm that the change was tested locally.",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (states.testsUpdated !== true) {
|
if (states.testsUpdated !== true) {
|
||||||
blockers.push({
|
blockers.push({
|
||||||
label: LABELS.needsTemplate.name,
|
label: LABELS.policyUnmet.name,
|
||||||
message: "Confirm that tests were added or updated when reasonable.",
|
message: "Confirm that tests were added or updated when reasonable.",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -255,11 +256,11 @@ function analyzePullRequest(pr) {
|
|||||||
: LABELS.inScope.name,
|
: LABELS.inScope.name,
|
||||||
);
|
);
|
||||||
} else if (
|
} else if (
|
||||||
blockers.some((blocker) => blocker.label === LABELS.needsTemplate.name)
|
blockers.some((blocker) => blocker.label === LABELS.missingTemplate.name)
|
||||||
) {
|
) {
|
||||||
desiredLabels.add(LABELS.needsTemplate.name);
|
desiredLabels.add(LABELS.missingTemplate.name);
|
||||||
} else {
|
} else {
|
||||||
desiredLabels.add(blockers[0].label);
|
desiredLabels.add(LABELS.policyUnmet.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user