Skip to content

Commit

Permalink
ci: Validate PR title length instead of commit (#1433)
Browse files Browse the repository at this point in the history
* ci(pre-commit): Ignore commit title length in gitlint config, validate in PR title instead

* fix(gha): Remove invalid pull_request_target action for pr linter
  • Loading branch information
gracedo authored Jul 27, 2023
1 parent d5db6b4 commit 983334a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: "Lint PR"

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

jobs:
main:
Expand All @@ -15,3 +16,8 @@ jobs:
- uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: deepakputhraya/action-pr-title@master
with:
max_length: 72 # Max length of PR title
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitlint
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[general]
contrib=contrib-title-conventional-commits
ignore=body-is-missing
ignore=body-is-missing,title-max-length

0 comments on commit 983334a

Please sign in to comment.