mirror of
https://github.com/github/awesome-copilot.git
synced 2026-06-26 09:11:02 +00:00
chore: publish from main
This commit is contained in:
@@ -20,8 +20,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const managedLabels = {
|
const managedLabels = {
|
||||||
'targets-main': true,
|
|
||||||
'branched-main': true,
|
|
||||||
'skills': true,
|
'skills': true,
|
||||||
'plugin': true,
|
'plugin': true,
|
||||||
'agent': true,
|
'agent': true,
|
||||||
@@ -63,9 +61,6 @@ jobs:
|
|||||||
const filenames = files.map((file) => file.filename);
|
const filenames = files.map((file) => file.filename);
|
||||||
|
|
||||||
const patterns = {
|
const patterns = {
|
||||||
branchedMain: [
|
|
||||||
/^plugins\/[^/]+\/(?:agents|commands|skills)\//
|
|
||||||
],
|
|
||||||
skills: [
|
skills: [
|
||||||
/^skills\//
|
/^skills\//
|
||||||
],
|
],
|
||||||
@@ -107,59 +102,50 @@ jobs:
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
const isBranchedMain = filenames.some((filename) => matchesAny(filename, patterns.branchedMain));
|
|
||||||
const hasNewSubmission = files.some(
|
const hasNewSubmission = files.some(
|
||||||
(file) => file.status === 'added' && matchesAny(file.filename, patterns.newSubmission)
|
(file) => file.status === 'added' && matchesAny(file.filename, patterns.newSubmission)
|
||||||
);
|
);
|
||||||
|
|
||||||
const desiredLabels = new Set();
|
const desiredLabels = new Set();
|
||||||
|
|
||||||
if (context.payload.pull_request.base.ref === 'main') {
|
|
||||||
desiredLabels.add('targets-main');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (filenames.some((filename) => matchesAny(filename, patterns.externalPlugin))) {
|
if (filenames.some((filename) => matchesAny(filename, patterns.externalPlugin))) {
|
||||||
desiredLabels.add('external-plugin');
|
desiredLabels.add('external-plugin');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isBranchedMain) {
|
if (filenames.some((filename) => matchesAny(filename, patterns.skills))) {
|
||||||
desiredLabels.add('branched-main');
|
desiredLabels.add('skills');
|
||||||
} else {
|
}
|
||||||
if (filenames.some((filename) => matchesAny(filename, patterns.skills))) {
|
|
||||||
desiredLabels.add('skills');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (filenames.some((filename) => matchesAny(filename, patterns.plugin))) {
|
if (filenames.some((filename) => matchesAny(filename, patterns.plugin))) {
|
||||||
desiredLabels.add('plugin');
|
desiredLabels.add('plugin');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filenames.some((filename) => matchesAny(filename, patterns.agent))) {
|
if (filenames.some((filename) => matchesAny(filename, patterns.agent))) {
|
||||||
desiredLabels.add('agent');
|
desiredLabels.add('agent');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filenames.some((filename) => matchesAny(filename, patterns.instructions))) {
|
if (filenames.some((filename) => matchesAny(filename, patterns.instructions))) {
|
||||||
desiredLabels.add('instructions');
|
desiredLabels.add('instructions');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filenames.some((filename) => matchesAny(filename, patterns.websiteUpdate))) {
|
if (filenames.some((filename) => matchesAny(filename, patterns.websiteUpdate))) {
|
||||||
desiredLabels.add('website-update');
|
desiredLabels.add('website-update');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filenames.some((filename) => matchesAny(filename, patterns.hooks))) {
|
if (filenames.some((filename) => matchesAny(filename, patterns.hooks))) {
|
||||||
desiredLabels.add('hooks');
|
desiredLabels.add('hooks');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filenames.some((filename) => matchesAny(filename, patterns.workflow))) {
|
if (filenames.some((filename) => matchesAny(filename, patterns.workflow))) {
|
||||||
desiredLabels.add('workflow');
|
desiredLabels.add('workflow');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filenames.some((filename) => matchesAny(filename, patterns.canvasExtension))) {
|
if (filenames.some((filename) => matchesAny(filename, patterns.canvasExtension))) {
|
||||||
desiredLabels.add('canvas-extension');
|
desiredLabels.add('canvas-extension');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasNewSubmission) {
|
if (hasNewSubmission) {
|
||||||
desiredLabels.add('new-submission');
|
desiredLabels.add('new-submission');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentLabels = await github.paginate(github.rest.issues.listLabelsOnIssue, {
|
const currentLabels = await github.paginate(github.rest.issues.listLabelsOnIssue, {
|
||||||
|
|||||||
@@ -16,14 +16,6 @@ jobs:
|
|||||||
script: |
|
script: |
|
||||||
const labels = {
|
const labels = {
|
||||||
// Intent labels for PR categorization
|
// Intent labels for PR categorization
|
||||||
'targets-main': {
|
|
||||||
color: 'B60205',
|
|
||||||
description: 'PR targets staged instead of main'
|
|
||||||
},
|
|
||||||
'branched-main': {
|
|
||||||
color: 'D93F0B',
|
|
||||||
description: 'PR appears to include plugin files materialized from main'
|
|
||||||
},
|
|
||||||
'skills': {
|
'skills': {
|
||||||
color: '1D76DB',
|
color: '1D76DB',
|
||||||
description: 'PR touches skills'
|
description: 'PR touches skills'
|
||||||
|
|||||||
Reference in New Issue
Block a user