chore: Add Labeler Github Action (#5)

* Create labeler.yml
This commit is contained in:
Justin Hammond 2021-09-23 16:37:21 +08:00 committed by GitHub
parent c0e410850b
commit 6381d65bdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 55 additions and 0 deletions

46
.github/labeler.yml vendored Normal file
View file

@ -0,0 +1,46 @@
version: v1
labels:
- label: "type: feature"
sync: true
matcher:
title: "^feat: .*"
commits: "^feat: .*"
body: "(\\n|.)*- \\[x\\] feature(\\n|.)*"
- label: "type: bug"
sync: true
matcher:
title: "^fix: .*"
commits: "^fix: .*"
body: "(\\n|.)*- \\[x\\] (fix|bug)(\\n|.)*"
- label: "type: chore"
sync: true
matcher:
title: "^chore: .*"
commits: "^chore: .*"
body: "(\\n|.)*- \\[x\\] chore(\\n|.)*"
files: [ ".github/*" ]
- label: "type: docs"
sync: true
matcher:
title: "^docs: .*"
commits: "^docs: .*"
files: [ "*.md", "doc.go" ]
checks:
- context: "Semantic Pull Request"
url: "https://github.com/Fishwaldo/go-logadapter/blob/master/.github/labeler.yml"
description:
success: Ready for review & merge.
failure: Missing semantic label for merge.
labels:
any:
- 'type: feature'
- 'type: bug'
- 'type: chore'
- 'type: docs'
- 'type: maintenance'
- 'type: dependencies'

9
.github/workflows/labeler.yml vendored Normal file
View file

@ -0,0 +1,9 @@
on:
pull_request_target: # for OSS with public contributions
pull_request:
name: Labeler
jobs:
labeler:
runs-on: ubuntu-latest
steps:
- uses: fuxingloh/multi-labeler@v1