Lint your Git branch names using GitHub action.
name: Branchlint
on: pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Lint branch name
uses: lekterable/branchlint-action@2.1.0
with:
allowed: |
development
/(epic|feat|fix|chore)/DEV-\d{4}/i
errorMessage: 'Custom error message'
startAfter: '2021-01-01 00:00:00'
allowed - (required) a list of allowed branch names (strings and/or regular expressions) separated by a new line
errorMessage - (optional) a custom error message
startAfter - (optional) a date string (YYYY-MM-DD hh:mm:ss) after which the linting will start