GitHub Action to enforce a branch naming convention. Inspired by deepakputhraya/action-branch-name.
Important
JavaScript/TypeScript is not my forte. Contributions are welcome and appreciated but I will likely be of little help with any issues encountered when doing so.
Table Of Contents
name: Enforce Branch Name
on:
pull_request:
jobs:
enforce-branch-name:
name: enforce-branch-name
runs-on: ubuntu-latest
steps:
- name: 💂 Enforce Branch Name
uses: finleyfamily/[email protected] # it is HIGHLY recommended to pin this to a release
with:
allowed_prefixes: >-
bugfix,chore,dependabot,docs,feat,feature,fix,hotfix,
maint,maintain,maintenance,release,renovate
Key | Description |
---|---|
allowed_prefixes |
Comma delimited list of prefix that must be used in every branch (e.g. feature,hotfix ). |
exclude |
Comma delimited list of branch names to exclude from this check (e.g. main,master ). Defaults to main,master,pre-commit-ci-update-config . |
regex |
Regex pattern to validate the branch name. Defaults to ([a-z])+\/([a-zA-Z0-9\-\_])+ . |
This action provides no outputs.