mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-11 05:38:54 -05:00
* Update auto_labeler_issues.yml * Update auto_labeler_pr.yml * Update codeql-analysis.yml * Update crowdin_upload_strings.yml * Update lint_python.yaml * Update prepare_release.yml * Update publish_release.yml * Update tests.yml * Update for breaking change in actions/github-script@v5 Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
30 lines
805 B
YAML
30 lines
805 B
YAML
name: Auto Labeler - Issues
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
|
|
permissions:
|
|
issues: write
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Apply Triage Label
|
|
uses: actions/github-script@v6
|
|
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.rest.issues.addLabels({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
labels: ['Status: Needs Triage']
|
|
});
|