Skip to content

Commit

Permalink
chore: enable PR title validation (#33)
Browse files Browse the repository at this point in the history
as we squash all commits from a PR into one commit with the PR title as
commit message together with the description we do not need to validate
every singel commit

Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
  • Loading branch information
bavarianbidi authored Dec 11, 2023
1 parent 005c664 commit c9c5840
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 144 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,3 @@ jobs:

- name: make test
run: make test

- name: Install commitlint
run: |
npm install conventional-changelog-conventionalcommits
npm install commitlint@latest
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: npx commitlint --from HEAD~1 --to HEAD --verbose

- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
22 changes: 22 additions & 0 deletions .github/workflows/pull-request-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: MIT

name: "lint Pull Request title"

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

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131 changes: 0 additions & 131 deletions commitlint.config.js

This file was deleted.

0 comments on commit c9c5840

Please sign in to comment.