labeler.yml

 1name: "Labeler"
 2
 3on:
 4  issues:
 5    types: [opened, edited]
 6  pull_request_target:
 7    types: [opened, edited]
 8
 9jobs:
10  triage:
11    if: >
12      ${{ github.event_name == 'issues'
13          || (!startsWith(github.event.pull_request.title, 'chore(deps):')
14              && !contains(fromJSON('["chore/sync-gomod2nix","chore/update-flake-lock","update-screenshots","update-demo-gif"]'), github.head_ref)) }}
15    permissions:
16      contents: read
17      issues: write
18      pull-requests: write
19    runs-on: ubuntu-latest
20    steps:
21      - uses: actions/checkout@v7
22
23      - name: Apply Labels (issues — includes area/*)
24        if: github.event_name == 'issues'
25        uses: github/issue-labeler@v3.4
26        with:
27          repo-token: "${{ secrets.HOMEBREW_GITHUB_TOKEN }}"
28          configuration-path: .github/labeler-config.yml
29          enable-versioned-regex: 0
30          include-title: 1
31
32      - name: Apply Labels (PRs — no area/*, paths handle those)
33        if: github.event_name == 'pull_request_target'
34        uses: github/issue-labeler@v3.4
35        with:
36          repo-token: "${{ secrets.HOMEBREW_GITHUB_TOKEN }}"
37          configuration-path: .github/labeler-config-pr.yml
38          enable-versioned-regex: 0
39          include-title: 1