-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add auto labeler workflow (#758)
* chore: add auto labeler workflow 添加workflow:提交PR或者修改标题后自动添加/更新 label 自动添加的label包括: enhancement:标题以feat: 开头 document: 标题以docs: 开头 bug: 标题以fix:开头 refactor-main: 目标分支为refactor/develop ospp-2024: 目标分支为 ospp-2024/*
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
version: v1 | ||
|
||
labels: | ||
- label: 'enhancement' | ||
sync: true | ||
matcher: | ||
title: '^feat:.*' | ||
- label: 'document' | ||
sync: true | ||
matcher: | ||
title: '^docs:.*' | ||
- label: 'bug' | ||
sync: true | ||
matcher: | ||
title: '^fix:.*' | ||
- label: 'ospp-2024' | ||
sync: true | ||
matcher: | ||
baseBranch: '^ospp-2024/.*' | ||
- label: 'refactor-main' | ||
sync: true | ||
matcher: | ||
baseBranch: 'refactor/develop' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Pull Request Auto Labeler | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, edited] | ||
|
||
permissions: | ||
# Setting up permissions in the workflow to limit the scope of what it can do. Optional! | ||
contents: read # the config file | ||
pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request) | ||
|
||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: fuxingloh/multi-labeler@v4 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} # optional, default to '${{ github.token }}' | ||
config-path: .github/auto-labeler.yml # optional, default to '.github/labeler.yml' |