Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deepakputhraya/action-pr-title
Github action to enforce Pull Request title conventions
https://github.com/deepakputhraya/action-pr-title
github-actions hacktoberfest pull-request pull-requests pullrequest pullrequests
Last synced: 3 months ago
JSON representation
Github action to enforce Pull Request title conventions
- Host: GitHub
- URL: https://github.com/deepakputhraya/action-pr-title
- Owner: deepakputhraya
- License: mit
- Created: 2019-11-06T09:19:53.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T12:47:28.000Z (9 months ago)
- Last Synced: 2024-10-24T10:11:08.707Z (3 months ago)
- Topics: github-actions, hacktoberfest, pull-request, pull-requests, pullrequest, pullrequests
- Language: JavaScript
- Homepage:
- Size: 982 KB
- Stars: 127
- Watchers: 2
- Forks: 78
- Open Issues: 9
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-actions - Enforce naming convention on pull request title
- fucking-awesome-actions - Enforce naming convention on pull request title
- awesome-workflows - Enforce naming convention on pull request title
README
# Branch naming rules
Github action to enforce Pull Request title conventions
## Usage
See [action.yml](./action.yml)
```yaml
steps:
- uses: deepakputhraya/action-pr-title@master
with:
regex: '([a-z])+\/([a-z])+' # Regex the title should match.
allowed_prefixes: 'feature,fix,JIRA' # title should start with the given prefix
disallowed_prefixes: 'feat/,hotfix' # title should not start with the given prefix
prefix_case_sensitive: false # title prefix are case insensitive
min_length: 5 # Min length of the title
max_length: 20 # Max length of the title
github_token: ${{ github.token }} # Default: ${{ github.token }}
```### Note:
Ensure to add `types` to the Pull requests webhook event as by default workflows are triggered only
for `opened`, `synchronize`, or `reopened` pull request events. Read more about
it [here](https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#pull_request).
```yaml
on:
pull_request:
types: [opened, edited, synchronize, reopened]
```Triggering the action on anything other than `pull_request` will cause a failure.
## License
The scripts and documentation in this project are released under the [MIT License](./LICENSE)