Adding labelling to project action

This commit is contained in:
Jakub Jezek 2023-03-29 14:47:33 +02:00
parent 3fa284f16c
commit 1e6b57209f
No known key found for this signature in database
GPG key ID: 730D7C02726179A7
3 changed files with 45 additions and 1 deletions

15
.github/pr-branch-labeler.yml vendored Normal file
View file

@ -0,0 +1,15 @@
# Apply label "feature" if head matches "feature/*"
type: feature:
head: "feature/*"
# Apply label "feature" if head matches "feature/*"
type: enhancement:
head: "enhancement/*"
# Apply label "bugfix" if head matches one of "bugfix/*" or "hotfix/*"
type: bugfix:
head: ["bugfix/*", "hotfix/*"]
# Apply label "release" if base matches "release/*"
Bump Minor:
base: "release/next-minor"

7
.github/pr-glob-labeler.yml vendored Normal file
View file

@ -0,0 +1,7 @@
# Add type: unittest label if any changes in tests folders
type: unittest:
- any: ['tests/**/*', 'openpype/tests/**/*']
# any changes in documentation structure
type: documentation:
- any: ['website/**/*', 'docs/**/*']

View file

@ -20,6 +20,7 @@ jobs:
project_id: 11
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: Change Requested
size-label:
name: pr_size_label
runs-on: ubuntu-latest
@ -42,4 +43,25 @@ jobs:
"1000": "L",
"1500": "XL",
"2500": "XXL"
}
}
label_prs_branch:
name: pr_branch_label
runs-on: ubuntu-latest
if: github.event.action == 'opened'
steps:
- name: Label PRs - Branch name detection
uses: ffittschen/pr-branch-labeler@v1
with:
repo-token: ${{ secrets.YNPUT_BOT_TOKEN }}
label_prs_globe:
name: pr_globe_label
runs-on: ubuntu-latest
if: github.event.action == 'opened'
steps:
- name: Label PRs - Globe detection
uses: actions/labeler@v4
with:
repo-token: ${{ secrets.YNPUT_BOT_TOKEN }}
configuration-path: ".github/pr-glob-labeler.yml"