mirror of
https://github.com/github/awesome-copilot.git
synced 2026-06-13 19:34:54 +00:00
Route intake failures to submitter fixes (#1970)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -21,7 +21,7 @@ export const EXTERNAL_PLUGIN_INTAKE_LABELS = Object.freeze({
|
||||
},
|
||||
rejected: {
|
||||
color: "B60205",
|
||||
description: "Submission was rejected or failed intake validation",
|
||||
description: "Submission was rejected by a maintainer",
|
||||
},
|
||||
});
|
||||
|
||||
@@ -143,7 +143,7 @@ export async function applyExternalPluginIntakeEvaluation({
|
||||
issueNumber,
|
||||
evaluation,
|
||||
}) {
|
||||
const state = evaluation.intakeState ?? (evaluation.valid ? "ready-for-review" : "rejected");
|
||||
const state = evaluation.intakeState ?? (evaluation.valid ? "ready-for-review" : "requires-submitter-fixes");
|
||||
const desiredLabelsByState = {
|
||||
"ready-for-review": new Set(["external-plugin", "ready-for-review"]),
|
||||
"requires-submitter-fixes": new Set(["external-plugin", "requires-submitter-fixes"]),
|
||||
|
||||
@@ -492,7 +492,7 @@ function buildQualityGatesCommentSection(qualityResult) {
|
||||
|
||||
function getIntakeStateFromQualityResult(baseResult, qualityResult) {
|
||||
if (!baseResult.valid) {
|
||||
return "rejected";
|
||||
return "requires-submitter-fixes";
|
||||
}
|
||||
|
||||
if (qualityResult.failure_class === "submitter_fixes") {
|
||||
@@ -647,10 +647,10 @@ export async function evaluateExternalPluginIssue({ issue, token, runId, owner,
|
||||
].join("\n")
|
||||
: [
|
||||
marker,
|
||||
"## ❌ External plugin intake failed",
|
||||
"## ⚠️ External plugin intake requires submitter fixes",
|
||||
"",
|
||||
"This submission did not pass automated intake validation, so the issue has been closed.",
|
||||
`Edit the issue form to address the fixes below, then have the issue author or a maintainer comment \`${RERUN_INTAKE_COMMAND}\` to re-run intake for this closed submission.`,
|
||||
"This submission did not pass automated intake validation and cannot move to maintainer review yet.",
|
||||
`Edit the issue form to address the fixes below. Intake reruns automatically when the issue is edited, or the issue author/maintainer can comment \`${RERUN_INTAKE_COMMAND}\` to re-run on demand.`,
|
||||
"",
|
||||
"### Required fixes",
|
||||
"",
|
||||
@@ -663,7 +663,7 @@ export async function evaluateExternalPluginIssue({ issue, token, runId, owner,
|
||||
|
||||
return {
|
||||
valid,
|
||||
intakeState: valid ? "ready-for-review" : "rejected",
|
||||
intakeState: valid ? "ready-for-review" : "requires-submitter-fixes",
|
||||
markerPresent: parsed.markerPresent,
|
||||
errors: dedupedErrors,
|
||||
warnings: dedupedWarnings,
|
||||
|
||||
Reference in New Issue
Block a user