diff --git a/.github/labeler.yaml b/.github/labeler.yaml new file mode 100644 index 0000000..dedaded --- /dev/null +++ b/.github/labeler.yaml @@ -0,0 +1,20 @@ +github-actions: + - changed-files: + - any-glob-to-any-file: + - '.github/**' + +documentation: + - changed-files: + - any-glob-to-any-file: + - 'README.md' + - '**/*.md' + +legal: + - changed-files: + - any-glob-to-any-file: + - 'LICENSE' + +examples: + - changed-files: + - any-glob-to-any-file: + - 'example/**' diff --git a/.github/workflows/triage-ci.yaml b/.github/workflows/triage-ci.yaml new file mode 100644 index 0000000..8143e18 --- /dev/null +++ b/.github/workflows/triage-ci.yaml @@ -0,0 +1,14 @@ +name: "Triage PRs" +on: +- pull_request_target + +jobs: + triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + configuration-path: .github/labeler.yaml diff --git a/.github/workflows/triage.yaml b/.github/workflows/triage.yaml new file mode 100644 index 0000000..bf96abb --- /dev/null +++ b/.github/workflows/triage.yaml @@ -0,0 +1,18 @@ +name: Label issues +on: + issues: + types: + - reopened + - opened +jobs: + label_issues: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - run: gh issue edit "$NUMBER" --add-label "$LABELS" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + LABELS: needs-triage