mirror of
https://github.com/github/awesome-copilot.git
synced 2026-10-15 16:21:51 +00:00
chore: publish from main
This commit is contained in:
@@ -47,6 +47,7 @@ jobs:
|
||||
|
||||
const approval = await import(pathToFileURL(path.join(process.env.GITHUB_WORKSPACE, 'eng', 'external-plugin-approval.mjs')).href);
|
||||
const intake = await import(pathToFileURL(path.join(process.env.GITHUB_WORKSPACE, 'eng', 'external-plugin-intake.mjs')).href);
|
||||
const reviewBoard = await import(pathToFileURL(path.join(process.env.GITHUB_WORKSPACE, '.github', 'extensions', 'external-plugin-review-board', 'lib', 'state.mjs')).href);
|
||||
const parsedCommand = approval.parseDecisionCommand(context.payload.comment.body);
|
||||
|
||||
core.setOutput('should-run', 'false');
|
||||
@@ -85,7 +86,8 @@ jobs:
|
||||
});
|
||||
|
||||
const fallbackName = evaluation.plugin?.name ?? `issue-${context.issue.number}`;
|
||||
const canApprove = labelNames.has('ready-for-review') || labelNames.has('approved');
|
||||
const canApprove = labelNames.has('approved') ||
|
||||
reviewBoard.isReadyForApproval([...labelNames]);
|
||||
const canReject = !labelNames.has('approved');
|
||||
|
||||
if (parsedCommand.command === 'approve' && !canApprove) {
|
||||
@@ -547,6 +549,23 @@ jobs:
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await github.rest.issues.getLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: 'intake-manually-overridden'
|
||||
});
|
||||
} catch (error) {
|
||||
if (error.status !== 404) throw error;
|
||||
await github.rest.issues.createLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: 'intake-manually-overridden',
|
||||
color: 'BFD4F2',
|
||||
description: 'Submission was manually moved to review without passing automated intake gates'
|
||||
});
|
||||
}
|
||||
|
||||
await github.rest.reactions.createForIssueComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
@@ -562,6 +581,7 @@ jobs:
|
||||
desiredLabels: new Set([
|
||||
'external-plugin',
|
||||
'ready-for-review',
|
||||
'intake-manually-overridden',
|
||||
...(labelNames.has('external-plugin-canvas') ? ['external-plugin-canvas'] : [])
|
||||
])
|
||||
});
|
||||
|
||||
@@ -48,6 +48,22 @@ jobs:
|
||||
core.setOutput('issue-labels', JSON.stringify(labels));
|
||||
core.setOutput('should-sync', (!isApproved && !isClosedWithoutReopen) ? 'true' : 'false');
|
||||
|
||||
- name: Mark submission as awaiting review
|
||||
if: steps.guard.outputs.should-sync == 'true'
|
||||
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
|
||||
with:
|
||||
script: |
|
||||
const path = require('path');
|
||||
const { pathToFileURL } = require('url');
|
||||
const intakeState = await import(pathToFileURL(path.join(process.env.GITHUB_WORKSPACE, 'eng', 'external-plugin-intake-state.mjs')).href);
|
||||
|
||||
await intakeState.markExternalPluginIntakeAwaitingReview({
|
||||
github,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issueNumber: context.issue.number
|
||||
});
|
||||
|
||||
- name: Evaluate submission
|
||||
id: evaluation
|
||||
env:
|
||||
|
||||
@@ -52,6 +52,14 @@ jobs:
|
||||
color: '1D76DB',
|
||||
description: 'External plugin submission includes a canvas extension'
|
||||
},
|
||||
'first party': {
|
||||
color: '1D76DB',
|
||||
description: 'External plugin repository is owned by a Microsoft or GitHub first-party organization'
|
||||
},
|
||||
'third party': {
|
||||
color: '5319E7',
|
||||
description: 'External plugin repository is owned by another organization'
|
||||
},
|
||||
'hooks': {
|
||||
color: 'C2E0C6',
|
||||
description: 'PR touches hooks'
|
||||
@@ -73,6 +81,10 @@ jobs:
|
||||
color: 'D93F0B',
|
||||
description: 'Submission has quality-gate findings that submitter must fix before maintainer review'
|
||||
},
|
||||
'intake-manually-overridden': {
|
||||
color: 'BFD4F2',
|
||||
description: 'Submission was manually moved to review without passing automated intake gates'
|
||||
},
|
||||
'approved': {
|
||||
color: '1D76DB',
|
||||
description: 'Submission was approved by a maintainer'
|
||||
|
||||
Reference in New Issue
Block a user