diff --git a/.github/issue-labeler.yml b/.github/issue_labeler.yml similarity index 100% rename from .github/issue-labeler.yml rename to .github/issue_labeler.yml diff --git a/.github/pr_labeler_existing.yml b/.github/pr_labeler_existing.yml new file mode 100644 index 000000000..bb597386a --- /dev/null +++ b/.github/pr_labeler_existing.yml @@ -0,0 +1,5 @@ +docs: + - docs/* + +test: + - 'test/*' diff --git a/.github/pr-labeler.yml b/.github/pr_labeler_new.yml similarity index 100% rename from .github/pr-labeler.yml rename to .github/pr_labeler_new.yml diff --git a/.github/workflows/triage_existing.yml b/.github/workflows/triage_existing.yml new file mode 100644 index 000000000..b11397ae7 --- /dev/null +++ b/.github/workflows/triage_existing.yml @@ -0,0 +1,34 @@ +name: Triage + +on: + issues: + types: + - reopened + + pull_request_target: + - reopened + - synchronize + +jobs: + triage: + runs-on: ubuntu-latest + name: Label + + steps: + - name: Label pull requests + uses: actions/labeler@v3 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/pr_labeler_existing.yml + if: github.event_name == 'pull_request_target' + + - name: Label issues + # This is the latest commit in the v2.4 branch. Waiting for a 2.4.1 or newer release. + # https://github.com/github/issue-labeler/issues/24 + uses: github/issue-labeler@99b4c5dda477c65f4ef08486b73c5787e1e33601 + 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_name == 'issues' diff --git a/.github/workflows/triage.yml b/.github/workflows/triage_new.yml similarity index 85% rename from .github/workflows/triage.yml rename to .github/workflows/triage_new.yml index edc88c4ca..f97bc4dd5 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage_new.yml @@ -4,9 +4,9 @@ on: issues: types: - opened - - reopened pull_request_target: + - opened jobs: triage: @@ -18,7 +18,7 @@ jobs: uses: actions/labeler@v3 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/pr-labeler.yml + configuration-path: .github/pr_labeler_new.yml if: github.event_name == 'pull_request_target' - name: Label issues @@ -28,6 +28,6 @@ jobs: with: repo-token: "${{ secrets.GITHUB_TOKEN }}" not-before: 2021-12-07T07:00:00Z - configuration-path: .github/issue-labeler.yml + configuration-path: .github/issue_labeler.yml enable-versioned-regex: 0 if: github.event_name == 'issues'