diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000000..3eb8c74c96f0 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,10 @@ +# Labeler configuration file for GitHub Actions +# The action is ./.github/workflows/label.yml +# Docs for the syntax in this file can be found at +# https://github.com/actions/labeler + + +# Add 'Documentation' label to any changes within 'docs' folder or any subfolders +"Documentation+📑": +- changed-files: + - any-glob-to-any-file: docs/** diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 000000000000..1a69cfdbf597 --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,21 @@ +# This workflow will triage pull requests and apply a label based on the +# paths that are modified in the pull request. +# The paths are set up in .github/labeler.yml +# +# See: https://github.com/actions/labeler + +name: Labeler +on: [pull_request_target] + +jobs: + label: + + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}"