mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -05:00
[CI/meta] Add automatic labeling of changed files. (#4674)
* Theoretically this should work! * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * *ughhh* Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
26
.github/workflows/auto_labeler_issues.yml
vendored
Normal file
26
.github/workflows/auto_labeler_issues.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Auto Labeler - Issues
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Apply Triage Label
|
||||
uses: actions/github-script@v3
|
||||
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']
|
||||
});
|
||||
Reference in New Issue
Block a user