mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
27 lines
764 B
YAML
27 lines
764 B
YAML
name: Auto Labeler
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Apply Triage Label
|
|
uses: actions/github-script@0.4.0
|
|
with:
|
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
|
script: |
|
|
const is_status_label = (label) => label.name.startsWith('Status: ');
|
|
if (context.payload.issue.labels.some(is_status_label)) {
|
|
console.log('Issue already has Status label, skipping...');
|
|
return;
|
|
}
|
|
github.issues.addLabels({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
labels: ['Status: Needs Triage']
|
|
});
|