Repository: robustmq/robustmq (language: rust)

Issue:
ci: add GitHub Apps to automate and improve your workflow
### What type of enhancement is this?

Other

### What does the enhancement do?

RobustMQ has many task labels that currently require developers to manually apply the corresponding labels. However, existing issues and PRs already have fixed title headers, such as feat, docs, style, build, etc. We want to use Probot's GitHub Apps to help assign labels automatically.

You can refer to the following two links:
1. [probot](https://github.com/probot/probot)
2. [issuelabeler](https://probot.github.io/apps/issuelabeler/)
3. [pr-labeler](https://github.com/joaocarmo/pr-labeler)

other..., If you have new idea to finish it.

### Implementation challenges

No.


Discussion / hints:
@2hang3hu1in @LYZJU2019 I think you can try it.
Sounds good! Will take a look.
> Sounds good! Will take a look.

Ok，thanks.

Fix patch:
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index a1a172a8c..a591547e0 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -16,7 +16,7 @@
 name: Feature request
 title: "[Feat]"
 description: Suggest a new feature for RobustMQ
-labels: [ "feature request" ]
+labels: [ "kind:feat" ]
 body:
   - type: checkboxes
     attributes:
diff --git a/.github/ISSUE_TEMPLATE/subtask.yml b/.github/ISSUE_TEMPLATE/subtask.yml
index 7057676b8..ed5059fc3 100644
--- a/.github/ISSUE_TEMPLATE/subtask.yml
+++ b/.github/ISSUE_TEMPLATE/subtask.yml
@@ -14,8 +14,9 @@
 
 ---
 name: Subtask
-title: "[RPIP-*/MINOR][Style/Refactor/Performance/Docs/Test/Build/CI/Chore][Subtask]"
+title: "[RBIP-*/MINOR][Style/Refactor/Performance/Docs/Test/Build/CI/Chore][Subtask]"
 description: A subtask issue
+labels: [kind:subtask]
 body:
   - type: checkboxes
     attributes:
diff --git a/.github/ISSUE_TEMPLATE/umbrella.yml b/.github/ISSUE_TEMPLATE/umbrella.yml
index 4a4824bd1..c7e35b33b 100644
--- a/.github/ISSUE_TEMPLATE/umbrella.yml
+++ b/.github/ISSUE_TEMPLATE/umbrella.yml
@@ -16,6 +16,7 @@
 name: Umbrella
 title: "[RPIP-*/MINOR]"
 description: An umbrella issue with multiple sub-tasks
+labels: [ "kind:umbrella" ]
 body:
   - type: checkboxes
     attributes:
diff --git a/.github/labeler-config.yml b/.github/labeler-config.yml
new file mode 100644
index 000000000..2e22997c9
--- /dev/null
+++ b/.github/labeler-config.yml
@@ -0,0 +1,213 @@
+# Copyright 2023 RobustMQ Team
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+filters:
+  # PRs: feat|fix|test|refactor|chore|style|docs|perf|build|ci|revert
+  - label: kind:feat
+    regexs:
+      - /^feat(\(.*\))?:/i
+    events: [pull_request]
+    targets: [title]
+
+  - label: kind:bug
+    regexs:
+      - /^fix(\(.*\))?:/i
+    events: [pull_request]
+    targets: [title]
+
+  - label: kind:test
+    regexs:
+      - /^test(\(.*\))?:/i
+    events: [pull_request]
+    targets: [title]
+
+  - label: kind:refactor
+    regexs:
+      - /^refactor(\(.*\))?:/i
+    events: [pull_request]
+    targets: [title]
+
+  - label: kind:chore
+    regexs:
+      - /^chore(\(.*\))?:/i
+    events: [pull_request]
+    targets: [title]
+
+  - label: kind:style
+    regexs:
+      - /^style(\(.*\))?:/i
+    events: [pull_request]
+    targets: [title]
+
+  - label: kind:docs
+    regexs:
+      - /^docs(\(.*\))?:/i
+    events: [pull_request]
+    targets: [title]
+
+  - label: kind:perf
+    regexs:
+      - /^perf(\(.*\))?:/i
+    events: [pull_request]
+    targets: [title]
+
+  - label: kind:build
+    regexs:
+      - /^build(\(.*\))?:/i
+    events: [pull_request]
+    targets: [title]
+
+  - label: kind:ci
+    regexs:
+      - /^ci(\(.*\))?:/i
+    events: [pull_request]
+    targets: [title]
+
+  - label: kind:revert
+    regexs:
+      - /^revert(\(.*\))?:/i
+    events: [pull_request]
+    targets: [title]
+
+  # subtask issues: [RBIP-*/MINOR][Style/Refactor/Performance/Docs/Test/Build/CI/Chore][Subtask]xxx
+  - label: kind:style
+    regexs:
+      - /^\[(RBIP-\d+|MINOR)\]\[Style\]\[Subtask\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:refactor
+    regexs:
+      - /^\[(RBIP-\d+|MINOR)\]\[Refactor\]\[Subtask\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:perf
+    regexs:
+      - /^\[(RBIP-\d+|MINOR)\]\[Performance\]\[Subtask\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:docs
+    regexs:
+      - /^\[(RBIP-\d+|MINOR)\]\[Docs\]\[Subtask\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:test
+    regexs:
+      - /^\[(RBIP-\d+|MINOR)\]\[Test\]\[Subtask\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:build
+    regexs:
+      - /^\[(RBIP-\d+|MINOR)\]\[Build\]\[Subtask\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:ci
+    regexs:
+      - /^\[(RBIP-\d+|MINOR)\]\[CI\]\[Subtask\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:chore
+    regexs:
+      - /^\[(RBIP-\d+|MINOR)\]\[Chore\]\[Subtask\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:subtask
+    regexs:
+      - /^\[(RBIP-\d+|MINOR)\].*\[Subtask\]/
+    events: [issues]
+    targets: [title]
+  
+  # enhancement issues: [Style/Refactor/Performance/Doc/Test/Build/CI/Chore]xxx
+  - label: kind:style
+    regexs:
+      - /^\[Style\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:refactor
+    regexs:
+      - /^\[Refactor\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:perf
+    regexs:
+      - /^\[Performance\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:docs
+    regexs:
+      - /^\[Docs\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:test
+    regexs:
+      - /^\[Test\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:build
+    regexs:
+      - /^\[Build\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:ci
+    regexs:
+      - /^\[CI\]/
+    events: [issues]
+    targets: [title]
+
+  - label: kind:chore
+    regexs:
+      - /^\[Chore\]/
+    events: [issues]
+    targets: [title]
+
+  - label: enhancement
+    regexs:
+      - /^\[(Style|Refactor|Performance|Docs|Test|Build|CI|Chore)\]/
+    events: [issues]
+    targets: [title]
+
+  # bug issue: [BUG]
+  - label: kind:bug
+    regexs:
+      - /^\[BUG\]/
+    events: [issues]
+    targets: [title]
+
+  # feature request issue: [Feat]
+  - label: kind:feat
+    regexs:
+      - /^\[Feat\]/
+    events: [issues]
+    targets: [title]
+
+  # umbrella issue: [RPIP-*/MINOR] and no [Subtask]
+  - label: kind:umbrella
+    regexs:
+      - /^\[(RBIP-\d+|MINOR)\](?!.*\[Subtask\])/
+    events: [issues]
+    targets: [title]
+    
\ No newline at end of file
diff --git a/.github/workflows/pr-issue-labeler.yml b/.github/workflows/pr-issue-labeler.yml
new file mode 100644
index 000000000..0083aa852
--- /dev/null
+++ b/.github/workflows/pr-issue-labeler.yml
@@ -0,0 +1,43 @@
+# Copyright 2023 RobustMQ Team
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# example
+name: Issue PR Labeler
+
+on:
+  issues:
+    types:
+      - opened
+      - reopened
+      - edited
+  pull_request_target:
+    types:
+      - opened
+      - reopened
+      - edited
+
+jobs:
+  main:
+    runs-on: ubuntu-latest
+
+    permissions:
+      contents: read       # required to read configuration yml file
+      issues: write        # required to add labels to issues
+      pull-requests: write # required to add labels to pull requests
+
+    steps:
+      - name: Run Issue PR Labeler
+        uses: hoho4190/issue-pr-labeler@v2.0.0
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/docs/en/ContributionGuide/GitHub-Contribution-Guide.md b/docs/en/ContributionGuide/GitHub-Contribution-Guide.md
index 3139a64fe..0975849ac 100644
--- a/docs/en/ContributionGuide/GitHub-Contribution-Guide.md
+++ b/docs/en/ContributionGuide/GitHub-Contribution-Guide.md
@@ -16,29 +16,32 @@ The main types of ISSUES include: feat, bug, test, refactor, chore, style, docs,
 
 ### Users and Contributors Creating ISSUES
 
-For users, if there are new feature requirements or bug fixes, they can submit an Issue by selecting `BugReport` and `FeatureRequest`.
+For users and contributors, if there are new feature requirements or bug fixes, they can submit an Issue by selecting `BugReport`, `Enhancement` or `FeatureRequest`.
 
 ![image](../../images/GithubContributionGuide-1.png)
 
-For contributors, if there are new feature requirements or bug fixes for a `Pull Request`, they should also create corresponding `BugReport` and `FeatureRequest` ISSUES before submitting the `Pull Request`. For other types of `Pull Request` submissions, use `Enhancement` to create an Issue according to the corresponding category before submitting the `Pull Request`.
-
-![image](../../images/GithubContributionGuide-2.png)
-
 ### Committer Creating ISSUES
 
-Creating various types of Issues is the same as for users, but since this involves proactive planning and task development, there are two scenarios. For small tasks, directly use `BugReport`, `Enhancement`, `FeatureRequest` to associate with the `Pull Request`. For larger planned tasks that need to be broken down, use `Umbrella` to associate with the corresponding Issue and plan subtasks below it, as shown below:
+If it is a small development task, then the process of creating an issue will be similar to users and contributors. You can  use `BugReport`, `Enhancement`, or `FeatureRequest` to associate your issue with pull requests.
 
-todo Add images on how to use umbrella to create subtasks
+If it is a relatively large planned task that needs to be broken down, use `Umbrella` to associate with the corresponding issues and plan subtasks inside `Umbrella`. The specifics are as follows:
+
+![image](../../images/GithubContributionGuide-2.png)
 
 For each subtask, create the corresponding subtask using `Subtask` and describe the specific content that needs to be completed for that subtask.
 
-For the title of `Umbrella`, it is temporarily divided into two categories, RBIP-* and MINOR.
+For `Umbrella`, it is temporarily divided into two categories, RBIP-* and MINOR.
 
 RBIP-*: Indicates the addition of features and characteristics, such as RBIP-09, RBIP-10, with the sequence number increasing.
 ![image](../../images/GithubContributionGuide-3.png)
 
 MINOR: Indicates fixing or adding small features. It can start with MINOR, followed by the title.
-![image](../../images/doc-image10.png)
+![image](../../images/GithubContributionGuide-4.png)
+
+For `Subtask`, use the following format:
+`[RBIP-*/MINOR][Style/Refactor/Performance/Docs/Test/Build/CI/Chore][Subtask] xxx`, for example,
+
+![image](../../images/GithubContributionGuide-5.png)
 
 ## 2. Creating a Pull Request
 
diff --git a/docs/images/GithubContributionGuide-1.png b/docs/images/GithubContributionGuide-1.png
index a53eef6a8..5966f5e38 100644
Binary files a/docs/images/GithubContributionGuide-1.png and b/docs/images/GithubContributionGuide-1.png differ
diff --git a/docs/images/GithubContributionGuide-2.png b/docs/images/GithubContributionGuide-2.png
index b9621f428..d463a5cf2 100644
Binary files a/docs/images/GithubContributionGuide-2.png and b/docs/images/GithubContributionGuide-2.png differ
diff --git a/docs/images/GithubContributionGuide-3.png b/docs/images/GithubContributionGuide-3.png
index 0381a0a83..1ab50c345 100644
Binary files a/docs/images/GithubContributionGuide-3.png and b/docs/images/GithubContributionGuide-3.png differ
diff --git a/docs/images/GithubContributionGuide-4.png b/docs/images/GithubContributionGuide-4.png
new file mode 100644
index 000000000..77978ccfe
Binary files /dev/null and b/docs/images/GithubContributionGuide-4.png differ
diff --git a/docs/images/GithubContributionGuide-5.png b/docs/images/GithubContributionGuide-5.png
new file mode 100644
index 000000000..e163c0b21
Binary files /dev/null and b/docs/images/GithubContributionGuide-5.png differ
diff --git a/docs/images/doc-image10.png b/docs/images/doc-image10.png
deleted file mode 100644
index d61bbf7f7..000000000
Binary files a/docs/images/doc-image10.png and /dev/null differ
diff --git a/docs/zh/ContributionGuide/GitHub-Contribution-Guide.md b/docs/zh/ContributionGuide/GitHub-Contribution-Guide.md
index 102b2cc58..c2f587f50 100644
--- a/docs/zh/ContributionGuide/GitHub-Contribution-Guide.md
+++ b/docs/zh/ContributionGuide/GitHub-Contribution-Guide.md
@@ -16,39 +16,36 @@ ISSUE 主要的范围类型有：feat, bug, test, refactor, chore, style, docs,
 
 ### 用户与贡献者创建ISSUE
 
-对于用户而言，如果有新的feat需求和bug的修复的需求，
-可以通过选择`BugReport`以及`FeatureRequest`来提交Issue。
+对于用户和贡献者而言，如果有新的feat需求和bug的修复的需求，
+可以通过选择`BugReport`，`Enhancement`以及`FeatureRequest`来提交Issue。
 
 ![image](../../images/GithubContributionGuide-1.png)
 
-对于贡献者而言，如果有新的feat需求和bug的修复的`Pull Request`
-进行提交，同用户一样创建对应的`BugReport`以及`FeatureRequest`
-ISSUE后再进行`Pull Request`的提交。 如果是其他类型的`Pull Request`
-提交，请选择使用`Enhancement`来按照对应的分类创建好Issue后再进行`Pull
-Request`的提交。
-
-![image](../../images/GithubContributionGuide-2.png)
-
 ### Committer创建ISSUE
 
-对于创建各个类型的Issue同用户创建一致，但是这里由于是主动介入规划的任务开发，所以会分为两种
-情况，针对一些小的任务，直接使用`BugReport`, `Enhancement`, `FeatureRequest`对`Pull
-Request`进行关联，如果是比较大的规划任务需要进行拆分，此时使用`Umbrella`关联对应的Issue后，
-在其下方规划子任务，具体如下所示:
+如果是小任务项目, 那么同用户和贡献者类似，直接使用`BugReport`, `Enhancement`, `FeatureRequest`对`Pull
+Request`进行关联，
 
-todo 补充如何使用umbrella创建子任务的图片
+如果是比较大的规划任务，需要进行拆分，此时使用`Umbrella`关联对应的Issue后，在其下方规划子任务，具体如下所示:
+
+![image](../../images/GithubContributionGuide-2.png)
 
 对于各项的子任务，则是通过`Subtask`来创建对应的子任务，在子任务中说明该部分子任务需要完成
 的对应内容。
 
 对于`Umbrella`的标题，暂时分为两类，RBIP-\* 和 MINOR 进行区分。
 
-RBIP-\*： 是标识有特性和功能添加，比如 RBIP-09，RBIP-10，后面的序号是递增的。
+[RBIP-\*]： 是标识有特性和功能添加，比如 RBIP-09，RBIP-10，后面的序号是递增的。
 ![image](../../images/GithubContributionGuide-3.png)
 
 
-MINOR：标识是修复或者增加一些小的功能。则可以 MINOR：开头，接标题。
-![image](../../images/doc-image10.png)
+[MINOR]：标识是修复或者增加一些小的功能。则可以 MINOR：开头，接标题。
+![image](../../images/GithubContributionGuide-4.png)
+
+对于`Subtask`标题，使用以下格式：
+`[RBIP-*/MINOR][Style/Refactor/Performance/Docs/Test/Build/CI/Chore][Subtask] xxx`，例如：
+
+![image](../../images/GithubContributionGuide-5.png)
 
 ## 2、创建 Pull Request
 


Test patch: