Skip to content

Commit

Permalink
Add action to label issues
Browse files Browse the repository at this point in the history
Separate issue and PR labeler configs
  • Loading branch information
samdoran committed Dec 7, 2021
1 parent b163d66 commit dfe8565
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .github/issue-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
needs_triage:
- '.*'
11 changes: 0 additions & 11 deletions .github/labeler.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
needs_triage:
- '.*'
- '.*/*'
- '*'
- '*/*'

docs:
- docs/*

test:
- 'test/*'
18 changes: 12 additions & 6 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
name: Triage

permissions:
contents: read
pull-requests: write
issues: write

on:
issues:
types:
Expand All @@ -19,7 +14,18 @@ jobs:
name: Label

steps:
- name: Apply labels
- name: Label pull requests
uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/pr-labeler.yml
if: github.event == 'pull_request_target'

- name: Label issues
uses: github/issue-labeler@v2.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
not-before: 2021-12-07T07:00:00Z
configuration-path: .github/issue-labeler.yml
enable-versioned-regex: 0
if: github.event == 'issues'

0 comments on commit dfe8565

Please sign in to comment.