Skip to content

Commit

Permalink
ci: validate PR titles against conventional commits. (#1075)
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk authored Jul 16, 2024
1 parent 2bccfb4 commit 8242a75
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Lint PR"

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

permissions:
pull-requests: read

jobs:
main:
name: Validate PR follows Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
## A non-comprehensive list of scopes. Scope is not required, but strongly encouraged, as it brings
## structure to changelogs.
## Note: releases are committed with "chore(release): <version or [module@version]> ".
scopes: |
actors
bottomup
cli
contracts
core
deps
docker
ext
extras
infra
ipld
misc
node
relayer
release
repo
scripts
specs
topdown
requireScope: false
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.

0 comments on commit 8242a75

Please sign in to comment.