diff --git a/.github/workflows/issue-priority-label.yml b/.github/workflows/issue-priority-label.yml new file mode 100644 index 000000000..f07b8cc3d --- /dev/null +++ b/.github/workflows/issue-priority-label.yml @@ -0,0 +1,48 @@ +# Copy to /.github/workflows/issue-priority-label.yml (apply.sh does this). +# Turns the issue form's required "Priority" dropdown into the matching priority:* label, +# so every ticket carries its priority as a label from the moment it's filed. +# Uses only the repo-scoped GITHUB_TOKEN — no secrets to configure. +name: Label issue priority + +on: + issues: + types: [opened, edited] + +permissions: + issues: write + +jobs: + label: + runs-on: ubuntu-latest + steps: + - name: Apply priority label from the form dropdown + env: + GH_TOKEN: ${{ github.token }} + BODY: ${{ github.event.issue.body }} + NUM: ${{ github.event.issue.number }} + REPO: ${{ github.repository }} + run: | + # Dropdowns render as "###