Skip to content

dcdavidev/namae-no-eda

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

namae-no-eda logo

namae-no-eda (名前の枝, "branch name")

Keep your branch names tidy, like leaves on a tree

haiku

Example

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

How it works

  • 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.

Code Reviews

CodeRabbit Pull Request Reviews

📄 License

This repository is licensed under the MIT License.

Contributors 3

  •  
  •  
  •