Skip to content

Commit

Permalink
ci: check PR title instead of commits (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwylde authored Jul 27, 2023
1 parent da982b1 commit a85d7a8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check PR title

on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

jobs:
lint:
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- uses: aslafy-z/conventional-pr-title-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
- name: Check unpinned versions
run: ./.github/scripts/pin-version
- name: node modules cache
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,13 @@ First and foremost please and comply with the standards outlined in the [CODE_OF
```

#### _Note:_

_To disable commit formatting on your fork you can either comment out the contents of the lefthook.yaml file or remove it, as well as uninstall lefthook from the package.json file._
_To disable linting during the `pre-push` git hook (on your fork), you can either comment out the contents of the lefthook.yaml file or remove it, as well as uninstall lefthook from the package.json file._

i.e

```sh
rm lefthook.yaml
yarn remove lefthook
$ rm lefthook.yaml
$ yarn remove lefthook
```

### Branch naming conventions
Expand Down
9 changes: 0 additions & 9 deletions lefthook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,3 @@ pre-push:
- merge
- rebase
run: ./.github/scripts/pin-version

commit-msg:
parallel: true
commands:
commitlint:
skip:
- merge
- rebase
run: yarn commitlint --edit

0 comments on commit a85d7a8

Please sign in to comment.