| 1 |
name: Labels |
| 2 |
on: |
| 3 |
pull_request_target: # zizmor: ignore[dangerous-triggers] |
| 4 |
types: |
| 5 |
- opened |
| 6 |
- synchronize |
| 7 |
- reopened |
| 8 |
# For label-checker |
| 9 |
- labeled |
| 10 |
- unlabeled |
| 11 |
|
| 12 |
permissions: {} |
| 13 |
|
| 14 |
jobs: |
| 15 |
labeler: |
| 16 |
permissions: |
| 17 |
contents: read |
| 18 |
pull-requests: write |
| 19 |
runs-on: ubuntu-latest |
| 20 |
timeout-minutes: 5 |
| 21 |
steps: |
| 22 |
- uses: actions/labeler@b8dd2d9be0f68b860e7dae5dae7d772984eacd6d # v6.2.0 |
| 23 |
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }} |
| 24 |
- run: echo "Done adding labels" |
| 25 |
# Run this after labeler applied labels |
| 26 |
check-labels: |
| 27 |
needs: |
| 28 |
- labeler |
| 29 |
permissions: |
| 30 |
pull-requests: read |
| 31 |
runs-on: ubuntu-latest |
| 32 |
timeout-minutes: 5 |
| 33 |
steps: |
| 34 |
- uses: agilepathway/label-checker@c3d16ad512e7cea5961df85ff2486bb774caf3c5 # v1.6.65 |
| 35 |
with: |
| 36 |
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal,release |
| 37 |
repo_token: ${{ secrets.GITHUB_TOKEN }} |