diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..0c80a75 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,20 @@ +# Label definitions for actions/labeler + +# Templates label for changes to markdown-templates directory +templates: + - changed-files: + - any-glob-to-any-file: "markdown-templates/**/*" + +# Workflows label for changes to GitHub workflow files (excluding changes that only change workflows prefixed with _) +workflows: + - changed-files: + - all-globs-to-any-files: + - ".github/workflows/*.yml" + - "!.github/workflows/_*.yml" + +# Documentation label for root level .md files and files in /docs/ directory +documentation: + - changed-files: + - any-glob-to-any-file: + - "*.md" + - "docs/**/*" diff --git a/.github/workflows/_labeler.yml b/.github/workflows/_labeler.yml new file mode 100644 index 0000000..45c065c --- /dev/null +++ b/.github/workflows/_labeler.yml @@ -0,0 +1,15 @@ +name: Label PRs +on: + - pull_request_target + +jobs: + labeler: + name: PR Labeler + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + sync-labels: true