Skip to content

Commit

Permalink
build: auto label prs (#1347)
Browse files Browse the repository at this point in the history
* build: auto label prs

* build: auto label prs

* build: auto label prs

* build: auto label prs

* build: auto label prs

* build: update regex to support scope
  • Loading branch information
setchy authored Jul 9, 2024
1 parent b96527b commit 79d461c
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 26 deletions.
45 changes: 45 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: v1

labels:
- label: 'enhancement'
matcher:
title: '^feat(\(\w+\))?: .*'

- label: 'bug'
matcher:
title: '^fix(\(\w+\))?: .*'

- label: 'refactor'
matcher:
title: '^refactor(\(\w+\))?: .*'

- label: 'documentation'
matcher:
title: '^docs(\(\w+\))?: .*'

- label: 'test'
matcher:
title: '^test(\(\w+\))?: .*'

- label: 'build'
matcher:
title: '^(ci|build)(\(\w+\))?: .*'

- label: 'dependency'
matcher:
title: '^(deps)(\(\w+\))?: .*'

checks:
- context: 'Semantic Pull Request'
description:
success: Ready for review & merge.
failure: Missing semantic label for merge.
labels:
any:
- enhancement
- bug
- refactor
- documentation
- test
- build
- dependency
26 changes: 0 additions & 26 deletions .github/workflows/label.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/pr-triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Triage PR

on:
pull_request:
types: [opened, edited, synchronize, ready_for_review]
branches: [master, main]

permissions:
contents: read # the config file
pull-requests: write # for labeling pull requests (on: pull_request_target or on: pull_request)
statuses: write # to generate status
checks: write # to generate status

jobs:
labeler:
name: Labeler
runs-on: ubuntu-latest
steps:
- uses: fuxingloh/multi-labeler@v4

0 comments on commit 79d461c

Please sign in to comment.