This is an automated email from the ASF dual-hosted git repository.
liuyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 0e0b3af [Docs] Add document label check robot (#12371)
0e0b3af is described below
commit 0e0b3afc551a96ac230ec2f14401089c0c5e179a
Author: fengtao1998 <[email protected]>
AuthorDate: Mon Oct 18 15:09:07 2021 +0800
[Docs] Add document label check robot (#12371)
* Update PULL_REQUEST_TEMPLATE.md
* Create ci-documentbot.yml
* Update ci-documentbot.yml
---
.github/PULL_REQUEST_TEMPLATE.md | 6 +++---
.github/workflows/ci-documentbot.yml | 28 ++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 0a3dccb..c89a1fe 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -72,15 +72,15 @@ Check the box below and label this PR (if you have
committer privilege).
Need to update docs?
-- [ ] doc-required
+- [ ] `doc-required`
(If you need help on updating docs, create a doc issue)
-- [ ] no-need-doc
+- [ ] `no-need-doc`
(Please explain why)
-- [ ] doc
+- [ ] `doc`
(If this PR contains doc changes)
diff --git a/.github/workflows/ci-documentbot.yml
b/.github/workflows/ci-documentbot.yml
new file mode 100644
index 0000000..546e85e
--- /dev/null
+++ b/.github/workflows/ci-documentbot.yml
@@ -0,0 +1,28 @@
+name: Auto Labeling
+
+on:
+ pull_request_target :
+ types:
+ - opened
+ - edited
+ - labeled
+
+
+
+# A GitHub token created for a PR coming from a fork doesn't have
+# 'admin' or 'write' permission (which is required to add labels)
+# To avoid this issue, you can use the `scheduled` event and run
+# this action on a certain interval.And check the label about the
+# document.
+
+jobs:
+ labeling:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: apache/pulsar-test-infra/doc-label-check@master
+ with:
+ github-token: ${{ secrets.DOCBOT_TOKEN }}
+ label-pattern: '- \[(.*?)\] ?`(.+?)`' # matches '- [x] `label`'
+ bot-name: 'eolivelli'