diff --git a/.github/header-checker-lint.yml b/.github/header-checker-lint.yml index 670299df..6d78e84b 100644 --- a/.github/header-checker-lint.yml +++ b/.github/header-checker-lint.yml @@ -17,6 +17,7 @@ ignoreFiles: - ".github/header-checker-lint.yml" - ".github/sync-repo-settings.yaml" - ".github/workflows/docs.yml" + - ".github/workflows/labeler.yml" - ".kokoro/**" - "**/requirements.txt" - "**/requirements*.txt" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..93a5b4b5 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,25 @@ +name: Add Default P0 Label to Issues and PRs + +on: + issues: + types: [opened] + pull_request: + types: [opened] + +jobs: + add-p0-label: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - name: Add P0 label + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: ['priority: p0'] + })