mirror of
https://github.com/github/awesome-copilot.git
synced 2026-10-12 23:04:14 +00:00
* Phase 1: distributed CODEOWNERS and automated reviewer routing (#4184) - Replace the individual default CODEOWNERS owner with the core-maintainer team and add domain team ownership for extensions, plugins, content, hooks, workflows, .github, and eng. - Add .github/review-routing.yml as the single source of truth for reviewer pools, routes, labels, and SLA settings (ships in dry-run mode). - Add eng/review-routing.mjs (+ unit tests) with business-day math, least-loaded reviewer selection, routing and escalation planning, and workflow_run artifact validation. - Add Review Routing (workflow_run/dispatch/schedule), Review Routing Request (read-only needs-reviewer reader), and Review Escalation (weekday schedule) workflows. - Add needs-reviewer, review-overdue, review-escalated to setup-labels. - Document the model in docs/maintainers/review-routing.md. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address review feedback on reviewer routing and escalation - Escalate at routedOn + escalation business days (Mon -> Fri) - Leave labels untouched when requestReviewers fails and fail the job - Serialize read/plan/apply per PR across routing and escalation - Treat Label PR Intent artifact labels as authoritative - Re-route to an uncovered pool on head changes without restarting SLA - Use the due-label timestamp as the review boundary - Fall back to pool/escalation teams and report what was requested Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address second-round review feedback on review routing (#4184) - CODEOWNERS: route /hooks/ and /workflows/ to content reviewers, drop the separate /.github/workflows/ rule, and leave per-resource owner lines as on main (their removal is deferred to a separate cleanup). - Routing: ignore pending requests for unavailable reviewers when checking coverage; needs-reviewer excludes prior reviewers and changes nothing when no new reviewer can be requested. - Escalation comments show the actual routing date. - Cap sweep matrices at 256 targets and defer the remainder. - Docs: best-effort load balancing, matrix cap, and needs-reviewer semantics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Route workflow and hooks labels to the content pool (#4184) Drop the workflow-security reviewer pool per maintainer feedback: agentic workflows and hooks are reviewed like other content, and the repository's own GitHub Actions workflows stay with core maintainers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Pin routing contract in tests; make CONTRIBUTING routing note dry-run aware - Assert the exact label-to-pool mapping and priority order, pool set, and default/escalation pools for the shipped config. - CONTRIBUTING.md: describe automatic routing as active only once dry_run is turned off. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Simplify dry_run validation condition Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Aaron Powell <me@aaron-powell.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
158 lines
5.5 KiB
YAML
158 lines
5.5 KiB
YAML
name: Setup Repository Labels
|
|
|
|
on:
|
|
workflow_dispatch
|
|
|
|
permissions:
|
|
issues: write
|
|
|
|
jobs:
|
|
setup-labels:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Create or update labels
|
|
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
|
|
with:
|
|
script: |
|
|
const labels = {
|
|
// Intent labels for PR categorization
|
|
'skills': {
|
|
color: '1D76DB',
|
|
description: 'PR touches skills'
|
|
},
|
|
'plugin': {
|
|
color: '5319E7',
|
|
description: 'PR touches plugins'
|
|
},
|
|
'agent': {
|
|
color: '0E8A16',
|
|
description: 'PR touches agents'
|
|
},
|
|
'instructions': {
|
|
color: 'FBCA04',
|
|
description: 'PR touches instructions'
|
|
},
|
|
'new-submission': {
|
|
color: '006B75',
|
|
description: 'PR adds at least one new contribution'
|
|
},
|
|
'website-update': {
|
|
color: '0052CC',
|
|
description: 'PR touches website content or code'
|
|
},
|
|
'external-plugin': {
|
|
color: 'FEF2C0',
|
|
description: 'Public external plugin submission'
|
|
},
|
|
'external-plugin-canvas': {
|
|
color: '1D76DB',
|
|
description: 'External plugin submission includes a canvas extension'
|
|
},
|
|
'hooks': {
|
|
color: 'C2E0C6',
|
|
description: 'PR touches hooks'
|
|
},
|
|
'workflow': {
|
|
color: 'BFD4F2',
|
|
description: 'PR touches workflow automation'
|
|
},
|
|
// External plugin intake state labels
|
|
'awaiting-review': {
|
|
color: 'FBCA04',
|
|
description: 'Submission is waiting for automated intake validation'
|
|
},
|
|
'ready-for-review': {
|
|
color: '0E8A16',
|
|
description: 'Submission passed intake validation and is ready for maintainer review'
|
|
},
|
|
'requires-submitter-fixes': {
|
|
color: 'D93F0B',
|
|
description: 'Submission has quality-gate findings that submitter must fix before maintainer review'
|
|
},
|
|
'approved': {
|
|
color: '1D76DB',
|
|
description: 'Submission was approved by a maintainer'
|
|
},
|
|
'rejected': {
|
|
color: 'B60205',
|
|
description: 'Submission was rejected by a maintainer'
|
|
},
|
|
// Re-review labels
|
|
'removed': {
|
|
color: 'B60205',
|
|
description: 'External plugin was removed from the marketplace after re-review'
|
|
},
|
|
're-review-follow-up': {
|
|
color: 'D4C5F9',
|
|
description: 'Six-month re-review needs maintainer follow-up before a final decision'
|
|
},
|
|
'awaiting-approval': {
|
|
color: 'FBCA04',
|
|
description: 'External plugin awaiting maintainer approval'
|
|
},
|
|
// Review routing labels (see .github/review-routing.yml)
|
|
'needs-reviewer': {
|
|
color: 'D4C5F9',
|
|
description: 'Request automated reviewer routing for this PR'
|
|
},
|
|
'review-overdue': {
|
|
color: 'E99695',
|
|
description: 'First review is past its due date; a backup reviewer was requested'
|
|
},
|
|
'review-escalated': {
|
|
color: 'B60205',
|
|
description: 'Review escalated to the core-maintainer pool'
|
|
}
|
|
};
|
|
|
|
let created = 0;
|
|
let updated = 0;
|
|
let failed = 0;
|
|
|
|
for (const [name, config] of Object.entries(labels)) {
|
|
try {
|
|
await github.rest.issues.createLabel({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
name,
|
|
color: config.color,
|
|
description: config.description
|
|
});
|
|
created++;
|
|
core.info(`✓ Created label: ${name}`);
|
|
} catch (error) {
|
|
if (error.status === 422) {
|
|
// Label already exists, try to update it
|
|
try {
|
|
await github.rest.issues.updateLabel({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
name,
|
|
color: config.color,
|
|
description: config.description
|
|
});
|
|
updated++;
|
|
core.info(`✓ Updated label: ${name}`);
|
|
} catch (updateError) {
|
|
failed++;
|
|
core.error(`✗ Failed to update label ${name}: ${updateError.message}`);
|
|
}
|
|
} else {
|
|
failed++;
|
|
core.error(`✗ Failed to create label ${name}: ${error.message}`);
|
|
}
|
|
}
|
|
}
|
|
|
|
core.info(`
|
|
Label setup complete:
|
|
- Created: ${created}
|
|
- Updated: ${updated}
|
|
- Failed: ${failed}
|
|
- Total: ${Object.keys(labels).length}
|
|
`);
|
|
|
|
if (failed > 0) {
|
|
throw new Error(`Failed to setup ${failed} label(s)`);
|
|
}
|