Skip to content

Commit

Permalink
ci: Add automatic issue labelling
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Jan 28, 2025
1 parent 8f7f82a commit d2ab572
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 30 deletions.
22 changes: 22 additions & 0 deletions .github/advanced-issue-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
policy:
- template: [report-a-bug.yml]
section:
- id: [minecraftVersion]
block-list: [other]
label:
- name: Minecraft 1.21.4
keys: ['1.21.4']
- name: Minecraft 1.21.1
keys: ['1.21.1 (LTS)']
- name: Minecraft 1.20.1
keys: ['1.20.1 (LTS)']
- name: EOL
keys: ['Other (specify below)']
- id: [modLoader]
label:
- name: NeoForge
keys: ['NeoForge']
- name: Fabric
keys: ['Fabric']
- name: 'Forge'
keys: ['Forge']
30 changes: 0 additions & 30 deletions .github/workflows/build.yml.disabled

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/label-issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Label Issues
on:
issues:
types: [ opened ]
jobs:
label-component:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
strategy:
matrix:
template: [ report-a-bug.yml ]
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633

- name: Parse issue form
uses: TwelveIterations/github-issue-parser@main
id: issue-parser
with:
template-path: https://raw.githubusercontent.com/TwelveIterationMods/.github/refs/heads/main/.github/ISSUE_TEMPLATE/${{ matrix.template }}

- name: Set labels based on component field
uses: redhat-plumbers-in-action/advanced-issue-labeler@d498805e5c7c0658e336948b3363480bcfd68da6
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
template: ${{ matrix.template }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d2ab572

Please sign in to comment.