ci: add automatic pr labeler (#2912)

* ci: add automatic pr labeler

* ci: add specific pr target types for the labeler
This commit is contained in:
ITOH
2023-03-30 21:34:38 +02:00
committed by GitHub
parent 678063993a
commit f41fe4dbb5
2 changed files with 94 additions and 0 deletions

82
.github/labeler.yml vendored Normal file
View File

@@ -0,0 +1,82 @@
version: v1
labels:
- label: 'website'
sync: true
matcher:
files: 'website/**/*'
- label: 'pkg-all'
matcher:
files: '*'
- label: 'pkg-bot'
sync: true
matcher:
files: 'packages/bot/**/*'
- label: 'pkg-client'
sync: true
matcher:
files: 'packages/client/**/*'
- label: 'pkg-gateway'
sync: true
matcher:
files: 'packages/gateway/**/*'
- label: 'pkg-rest'
sync: true
matcher:
files: 'packages/rest/**/*'
- label: 'pkg-types'
sync: true
matcher:
files: 'packages/types/**/*'
- label: 'pkg-utils'
sync: true
matcher:
files: 'packages/utils/**/*'
- label: 't-breaking'
matcher:
title: "^[a-z]+(\\(.+\\))?!: .*"
- label: 't-build'
matcher:
title: "^build(\\(.+\\))?!?: .*"
- label: 't-ci'
matcher:
files: '.github/workflows/*'
title: '^ci: .*'
- label: 't-docs'
matcher:
title: "^docs(\\(.+\\))?!?: .*"
- label: 't-feat'
matcher:
title: "^feat(\\(.+\\))?!?: .*"
- label: 't-fix'
matcher:
title: "^fix(\\(.+\\))?!?: .*"
- label: 't-perf'
matcher:
title: "^perf(\\(.+\\))?!?: .*"
- label: 't-refactor'
matcher:
title: "^refactor(\\(.+\\))?!?: .*"
- label: 't-style'
matcher:
title: "^refactor(\\(.+\\))?!?: .*"
- label: 't-test'
matcher:
title: "^test(\\(.+\\))?!?: .*"

12
.github/workflows/labeler.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
on:
pull_request_target:
types: ['edited', 'opened', 'reopened', 'synchronize']
jobs:
labeler:
name: Labeler
runs-on: ubuntu-latest
steps:
- uses: fuxingloh/multi-labeler@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}