Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AlbertHernandez/branch-name-action
Check if the branch name is following a convention name
https://github.com/AlbertHernandez/branch-name-action
Last synced: 3 months ago
JSON representation
Check if the branch name is following a convention name
- Host: GitHub
- URL: https://github.com/AlbertHernandez/branch-name-action
- Owner: AlbertHernandez
- License: mit
- Created: 2020-05-10T09:46:21.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-15T19:11:38.000Z (12 months ago)
- Last Synced: 2024-04-24T13:54:58.470Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 8.94 MB
- Stars: 9
- Watchers: 1
- Forks: 4
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - AlbertHernandez/branch-name-action - Check if the branch name is following a convention name (JavaScript)
README
🔱
branch-name-action
Check if the branch name is following a convention name## Usage
You can create a `.github/workflows/branch-name.yml` file:
```yaml
name: Branch Name
on:
pull_request:
types: [opened]
jobs:
branch_name:
runs-on: ubuntu-latest
name: Branch Name
steps:
- uses: AlbertHernandez/branch-name-action@v1
with:
branch_pattern: 'feature|bug|chore|hotfix'
comment_for_invalid_branch_name: 'Ups! This branch name is not following the standards! You can see them here: https://github.com/AlbertHernandez'
fail_if_invalid_branch_name: 'true'
ignore_branch_pattern: 'master|beta'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```## Inputs
| Name | Description | Required | Default Value |
|------|-------------|----------|---------------|
| branch_pattern | Pattern that should follow the names of the branches | true | |
| comment_for_invalid_branch_name | Comment that will be written if the branch name does not follow the branch pattern | false | The name of this branch is not \n following the standards of this project! |
| fail_if_invalid_branch_name | If its true the the action will fail if the branch does not follow the branch pattern | false | false |
| ignore_branch_pattern | Pattern of the branches names where this action will be no executed | false | |