From 3bd2f7984188a51e1cfd79d7b43cfae449f38aaa Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Mon, 25 Dec 2023 23:55:01 +0800 Subject: [PATCH] chore(ci): auto doc labeler job (#2998) * chore(ci): auto doc labeler job Signed-off-by: Ruihang Xia * tweak rules Signed-off-by: Ruihang Xia --------- Signed-off-by: Ruihang Xia --- .github/doc-label-config.yml | 4 ++++ .github/pull_request_template.md | 1 + .github/workflows/doc-label.yml | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 .github/doc-label-config.yml create mode 100644 .github/workflows/doc-label.yml diff --git a/.github/doc-label-config.yml b/.github/doc-label-config.yml new file mode 100644 index 0000000000..60f20533a1 --- /dev/null +++ b/.github/doc-label-config.yml @@ -0,0 +1,4 @@ +Doc not needed: + - '- \[x\] This PR does not require documentation updates.' +Doc update required: + - '- \[ \] This PR does not require documentation updates.' diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1c62e4ad41..c0bc418013 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -15,5 +15,6 @@ Please explain IN DETAIL what the changes are in this PR and why they are needed - [ ] I have written the necessary rustdoc comments. - [ ] I have added the necessary unit tests and integration tests. +- [ ] This PR does not require documentation updates. ## Refer to a related PR or issue link (optional) diff --git a/.github/workflows/doc-label.yml b/.github/workflows/doc-label.yml new file mode 100644 index 0000000000..ba8bf61f75 --- /dev/null +++ b/.github/workflows/doc-label.yml @@ -0,0 +1,19 @@ +name: "PR Doc Labeler" +on: + pull_request: + types: [opened, edited] + +permissions: + pull-requests: write + contents: read + +jobs: + triage: + if: ${{ github.repository == 'GreptimeTeam/greptimedb' }} + runs-on: ubuntu-latest + steps: + - uses: github/issue-labeler@v3.3 + with: + configuration-path: .github/doc-label-config.yml + enable-versioned-regex: false + repo-token: ${{ github.token }}