Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/finleyfamily/action-enforce-branch-name
Github Action to enforce naming convention
https://github.com/finleyfamily/action-enforce-branch-name
github-actions
Last synced: about 2 months ago
JSON representation
Github Action to enforce naming convention
- Host: GitHub
- URL: https://github.com/finleyfamily/action-enforce-branch-name
- Owner: finleyfamily
- License: apache-2.0
- Created: 2024-07-23T17:28:50.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-12-09T01:59:15.000Z (about 2 months ago)
- Last Synced: 2024-12-09T02:42:26.315Z (about 2 months ago)
- Topics: github-actions
- Language: TypeScript
- Homepage: https://github.com/marketplace/actions/enforce-branch-name
- Size: 2.19 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Action: Enforce Branch Name
[![GitHub Super-Linter](https://github.com/finleyfamily/action-enforce-branch-name/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)
![CI](https://github.com/finleyfamily/action-enforce-branch-name/actions/workflows/ci.yml/badge.svg)
[![Check dist/](https://github.com/finleyfamily/action-enforce-branch-name/actions/workflows/check-dist.yml/badge.svg)](https://github.com/finleyfamily/action-enforce-branch-name/actions/workflows/check-dist.yml)
[![CodeQL](https://github.com/finleyfamily/action-enforce-branch-name/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/finleyfamily/action-enforce-branch-name/actions/workflows/codeql-analysis.yml)
[![Coverage](./badges/coverage.svg)](./badges/coverage.svg)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![renovate](https://img.shields.io/badge/enabled-brightgreen?logo=renovatebot&logoColor=%2373afae&label=renovate)](https://developer.mend.io/github/finleyfamily/action-branch-name)GitHub Action to enforce a branch naming convention.
Inspired by [deepakputhraya/action-branch-name](https://github.com/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**
- [Usage](#usage)
- [Inputs](#inputs)
- [Outputs](#outputs)## Usage
```yaml
name: Enforce Branch Nameon:
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
```### Inputs
| 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\-\_])+`. |### Outputs
This action provides no outputs.