A GitHub Action that verifies your pull request contains a reference to a ticket. You can use this to (optionally) check:
- The PR title contains
[PROJ-1234]
- The branch name contains
PROJ-1234
orPROJ_1234
- First commit contains
[PROJ-1234]
Forked changes:
- Instead of all commits requiring ticket reference, only the first commit is checked
- Re-written to be a JavaScript action instead of a Docker based one to speed up action
Add .github/workflows/main.yml
with the following:
name: PR Lint
on: [pull_request]
jobs:
pr_lint:
runs-on: ubuntu-latest
steps:
- uses: vijaykramesh/[email protected]
with:
projects: |
'PROJ'
'ABC'
check-title: true
check-branch: true
check-commits: true
ignore-case: true
require-brackets: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Run npm install
to install any dependencies needed.
Run npm test
to test:
Run npm lint
to run ESLint. Run npm lint --fix
to fix any issues that it
can.
If you have other things worth automatically checking for in your PRs, please submit a pull request.