NOTE: This a WIP project and IS NOT ready for production usage yet!
PR Title Linter is a GitHub Action which uses the CommitLint specifications behind-the-scenes to lint PR titles. The events which triggers the Action are:
- When a fresh new PR is created/opened.
- When a PR is synchronised or updated with the latest updates from the
main
/master
branch. - When the title of an existing PR is edited/changed.
You can find an entire list of certain events which triggers the Action on
GitHub's documentations here -
Events that trigger workflows - pull_request_target
.
So, if you feel we are missing on a certain event please let us know or even
better sharing a PR 😉
To use this Action to lint the PR titles of your repositories on GitHub, follow the instructions detailed in this section.
All you will need is an YAML file, name it anything but at Weburz we like the
filename to be as pr-lint.yml
. Store the pr-lint.yml
file at the
.github/workflows
directory. If you want to learn more about using existing
GitHub Actions for certain workflows, refer to the documentations at -
About Workflows.
That said, with the pr-lint.yml
file created, copy the following contents to
it:
name: Lint PR Titles
on:
pull_request_target:
types:
- opened
- edited
- synchronize
jobs:
pr-lint:
name: Lint PR Titles
runs-on: ubuntu-latest
steps:
- uses: Weburz/[email protected]
Push the latest commits to a remote repository and then create an example PR which should trigger the Action thereafter. If you stumbled across a bug or an unintended behaviour, please report it to us at the earliest.
The contents of this repository are licensed under an open-source license - MIT License. Therefore you are free to copy, modify and distribute the source as you see fit for both commercial and non-commercial usage as long as the usage does not breach the terms and conditions (T&Cs) of the license. To learn more about the T&Cs, please refer to the LICENSE document for a more detailed explanation!