https://github.com/jef/conventional-commits-pr-action
🧐 Lints pull request titles for conventional commits
https://github.com/jef/conventional-commits-pr-action
conventional-commits github-actions
Last synced: about 1 year ago
JSON representation
🧐 Lints pull request titles for conventional commits
- Host: GitHub
- URL: https://github.com/jef/conventional-commits-pr-action
- Owner: jef
- License: mit
- Created: 2021-02-23T15:07:17.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-02-12T22:24:03.000Z (over 1 year ago)
- Last Synced: 2025-04-14T22:37:38.328Z (about 1 year ago)
- Topics: conventional-commits, github-actions
- Language: TypeScript
- Homepage:
- Size: 787 KB
- Stars: 20
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# conventional-commits-pr-action
Lints pull requests based on [Conventional Commits v1.0.0](https://www.conventionalcommits.org/en/v1.0.0/).
Also has the ability to post a comment in the pull request conversation with examples.

Live examples:
- [With pull request comment](https://github.com/jef/conventional-commits-pr-action/pull/5)
- [Without pull request comment](https://github.com/jef/conventional-commits-pr-action/pull/4)
## Usage
```yaml
name: Pull Request Title Linter
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
pr_lint:
name: Lint pull request title
runs-on: ubuntu-latest
permissions:
pull-requests: write # post comments when 'comment' is true
steps:
- name: Lint pull request title
uses: jef/conventional-commits-pr-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
```
## Inputs
### `bots_ignore`
**Optional** A list of bots to ignore when linting the pull request title. Can be a comma-separated list.
### `comment`
**Optional** Post a comment in the pull request conversation with examples.
| Default value | `true` |
|---------------|--------|
> [!NOTE]
> Commenting in the pull request conversation requires that the token is configured with the `pull-requests` permission.
### `token`
**Required** Access token to the repository. Usually `${{ secrets.GITHUB_TOKEN }}`.
## Contributing
There are few npm tasks that will help you in building and packaging. All commands are prefaced by `npm run`.
- `build`: builds the action.
- `clean`: removes `build` directory.
- `compile`: transpiles TypeScript.
- `fix`: fixes lint and format issues.
- `lint`: runs linter and checks format issues.
- `start`: runs the action.
- `test`: tests the action.