Keep your branch names tidy, like leaves on a tree
This workflow validates branch names using namae-no-eda
.
By default it allows:
feat/*, fix/*, chore/*, docs/*, refactor/*, test/*, perf/*
and excludes:
main, release/*
.
name: Branch Lint
on:
pull_request:
branches:
- '**'
push:
branches:
- '**'
jobs:
branch-lint:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Validate branch name
uses: dcdavidev/[email protected] # Check latest release first.
# with:
# allowed: 'fix/*,feature/*,release/*' # Optional
# exclude: 'main,develop' # Optional
- allowed (optional): Comma-separated glob patterns. Defaults to
feat/*,fix/*,chore/*,docs/*,refactor/*,test/*,perf/*
. - exclude (optional): Comma-separated exact branch names. Defaults to
main,release/*
. - branch_name (optional): Branch to check. Defaults to the branch that triggered the workflow.
If the branch name does not match any allowed patterns and is not excluded, the action will fail the workflow.
This repository is licensed under the MIT License.