diff --git a/.github/labeler.yml b/.github/labeler.yml index 18db4383bc..414df5a31e 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -16,8 +16,3 @@ - any-glob-to-any-file: - github/* - '**/*.yml' - -# Add pending triage label to all PR's -'status: pending triage': -- changed-files: - - any-glob-to-any-file: '**' diff --git a/.github/workflows/label-pull-request-on-create.yml b/.github/workflows/label-pull-request-on-create.yml new file mode 100644 index 0000000000..94620657d4 --- /dev/null +++ b/.github/workflows/label-pull-request-on-create.yml @@ -0,0 +1,19 @@ +name: "Pull Request Labeler 2 (Runs on PR creation)" +on: + pull_request_target: + types: + - opened + +jobs: + # Apply `status: pending triage` to newly created pull requests + apply-pending-triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Apply "status pending triage" to new pull requests + uses: actions-ecosystem/action-add-labels@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + labels: "status: pending triage"