mirror of
https://github.com/github/awesome-copilot.git
synced 2026-06-17 21:21:20 +00:00
chore: publish from staged
This commit is contained in:
@@ -26,37 +26,6 @@ jobs:
|
||||
const rereview = await import(pathToFileURL(path.join(process.env.GITHUB_WORKSPACE, 'eng', 'external-plugin-rereview.mjs')).href);
|
||||
const validation = await import(pathToFileURL(path.join(process.env.GITHUB_WORKSPACE, 'eng', 'external-plugin-validation.mjs')).href);
|
||||
|
||||
const managedLabels = {
|
||||
[rereview.REREVIEW_LABELS.due]: {
|
||||
color: 'FBCA04',
|
||||
description: 'Approved external plugin is due for six-month re-review'
|
||||
},
|
||||
[rereview.REREVIEW_LABELS.followUp]: {
|
||||
color: 'D4C5F9',
|
||||
description: 'Six-month re-review needs maintainer follow-up before a final decision'
|
||||
},
|
||||
[rereview.REREVIEW_LABELS.removed]: {
|
||||
color: 'B60205',
|
||||
description: 'External plugin was removed from the marketplace after re-review'
|
||||
}
|
||||
};
|
||||
|
||||
async function ensureLabel(name, config) {
|
||||
try {
|
||||
await github.rest.issues.createLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name,
|
||||
color: config.color,
|
||||
description: config.description
|
||||
});
|
||||
} catch (error) {
|
||||
if (error.status !== 422) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function removeLabel(issueNumber, label) {
|
||||
try {
|
||||
await github.rest.issues.removeLabel({
|
||||
@@ -90,8 +59,6 @@ jobs:
|
||||
return Math.max(0, Math.floor(Math.abs(diff) / (1000 * 60 * 60 * 24)));
|
||||
}
|
||||
|
||||
await Promise.all(Object.entries(managedLabels).map(([name, config]) => ensureLabel(name, config)));
|
||||
|
||||
const { plugins, errors } = validation.readExternalPlugins({ policy: 'marketplace' });
|
||||
if (errors.length > 0) {
|
||||
core.setFailed(errors.join('\n'));
|
||||
|
||||
Reference in New Issue
Block a user