Skip to content

Commit

Permalink
Use branch for conventional commits
Browse files Browse the repository at this point in the history
  • Loading branch information
jamilbk committed Nov 16, 2022
1 parent 04acc3f commit 6158dfa
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 19 deletions.
11 changes: 11 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
feature: ['feat/*', 'feature/*']
chore: ['chore/*']
bug: ['fix/*', 'bug/*']
build: ['build/*']
ci: ['ci/*']
docs: ['docs/*']
style: ['style/*']
refactor: ['refactor/*']
perf: ['perf/*']
test: ['test/*']
revert: ['revert/*']
20 changes: 20 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR Labeler
on:
pull_request:
types: [opened]

permissions:
contents: read

jobs:
pr-labeler:
permissions:
contents: read # for TimonVS/pr-labeler-action to read config file
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
runs-on: ubuntu-latest
steps:
- uses: TimonVS/pr-labeler-action@v4
with:
configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/pr_labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR Labeler
on:
pull_request:
types: [opened]

permissions:
contents: read

jobs:
pr-labeler:
permissions:
contents: read # for TimonVS/pr-labeler-action to read config file
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
runs-on: ubuntu-latest
steps:
- uses: TimonVS/pr-labeler-action@v4
with:
configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 5 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.1.1
hooks:
- id: conventional-pre-commit
stages:
- commit-msg
args:
- fix
- feat
- build
- chore
- ci
- docs
- style
- refactor
- perf
- test
- revert
- repo: local
hooks:
# Elixir config
Expand Down Expand Up @@ -71,4 +53,8 @@ repos:
exclude: "^omnibus/config/patches/"
- id: check-merge-conflict
- id: no-commit-to-branch
args: [-b, master, -b, develop]
args:
- -b
- master
- --pattern
- '^(?!((chore|feat|feature|bug|fix|build|ci|docs|style|refactor|perf|test|revert)\/[a-zA-Z0-9\-]+)$).*'

0 comments on commit 6158dfa

Please sign in to comment.