From d8fc4a29415a1aa71467c04ebc5eeb07fb1e0890 Mon Sep 17 00:00:00 2001 From: Globallager <72797635+Globallager@users.noreply.github.com> Date: Thu, 2 Feb 2023 17:33:38 +0800 Subject: [PATCH 1/2] chore(github): Add PR Labeler Action (`doc needed`) --- .github/labeler.yml | 3 +++ .github/pull_request_template.md | 1 + .github/workflows/labeler.yml | 14 ++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..8e0c08c95c --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,3 @@ +# Add/remove 'doc needed' label if issue/PR contains the line '- [x] This PR requires documentation updates when merged.' +"doc needed": + - '- \[x\] This PR requires documentation updates when merged.' diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 85855468f2..d90e5c63ba 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -25,6 +25,7 @@ Resolves # - [ ] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this PR to the issue(s) that it resolves. - [ ] I have reviewed the changes on GitHub, line by line. - [ ] I have ensured all changes are covered in the description. +- [ ] This PR requires documentation updates when merged. # Additional context diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000000..0fe09ed9ac --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,14 @@ +name: "Labeler" +on: + pull_request: + types: [opened, edited] + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: github/issue-labeler@v2.6 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labeler.yml + enable-versioned-regex: 0 From 3583e45899cdc72316c642669c236786aa380a04 Mon Sep 17 00:00:00 2001 From: Globallager <72797635+Globallager@users.noreply.github.com> Date: Fri, 3 Feb 2023 12:22:19 +0800 Subject: [PATCH 2/2] Extend Labeling to cover PRs from Forks - Suggestions by Blaine Co-authored-by: Blaine Bublitz --- .github/workflows/labeler.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 0fe09ed9ac..efcf3ed7c6 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,7 +1,15 @@ name: "Labeler" on: - pull_request: - types: [opened, edited] + pull_request_target: + types: + - opened + - reopened + - edited + - synchronize + +permissions: + pull-requests: write + contents: read jobs: triage: