feat(Actions): Automatically add labels on PRs (#3571)
This commit is contained in:
parent
c5df114454
commit
9f93e554e6
3 changed files with 31 additions and 1 deletions
14
.github/label-pr.yml
vendored
Normal file
14
.github/label-pr.yml
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
- regExp: ".*\\.sql+$"
|
||||
labels: ["DB"]
|
||||
- regExp: ".*\\.(cpp|h)+$"
|
||||
labels: ["CORE"]
|
||||
- regExp: "src/server/scripts/(.*).(cpp|h)+$"
|
||||
labels: ["Script"]
|
||||
- regExp: ".*\\.md+$"
|
||||
labels: ["Documentation"]
|
||||
- regExp: ".*\\.sh+$"
|
||||
labels: ["Bash"]
|
||||
- regExp: ".*\\.cmake+$"
|
||||
labels: ["Cmake"]
|
||||
- regExp: ".*\\.yml+$"
|
||||
labels: ["Workflow"]
|
||||
16
.github/workflows/labeler.yml
vendored
Normal file
16
.github/workflows/labeler.yml
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Workflow to associate labels automatically
|
||||
name: labeler
|
||||
# Trigger the workflow on pull request events
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
# We need to checkout the repository to access the configured file (.github/label-pr.yml)
|
||||
- uses: actions/checkout@v2
|
||||
- name: Labeler
|
||||
uses: docker://decathlon/pull-request-labeler-action:2.0.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Here we can override the path for the action configuration. If none is provided, default one is `.github/label-pr.yml`
|
||||
CONFIG_PATH: ${{ secrets.GITHUB_WORKSPACE }}/.github/label-pr.yml
|
||||
|
|
@ -53,4 +53,4 @@ public:
|
|||
void AddSC_character_creation()
|
||||
{
|
||||
new CharacterCreationProcedures();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue