Skip to content

Commit

Permalink
👷(project) add git history and changelog checks
Browse files Browse the repository at this point in the history
For now, we do not enforce our git commits format, but we will 😉
  • Loading branch information
jmaupetit committed Mar 26, 2024
1 parent 468f2b2 commit bd2bd6b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/chore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Chore checks

on:
push:
branches-ignore: ["main"]
pull_request:
branches-ignore: ["main"]

jobs:
fixup:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Check absence of fixup commits
run: ! git log --pretty=format:%s | grep 'fixup!'

check-changelog:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Check that the CHANGELOG has been modified in the current branch
run: git whatchanged --name-only --pretty="" origin..HEAD | grep CHANGELOG

lint-changelog:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Check CHANGELOG max line length
run: |
test $(cat CHANGELOG.md | grep -Ev "^\[.*\]: https://github.com/MTES-MCT/qualicharge" | wc -L) -le 80

0 comments on commit bd2bd6b

Please sign in to comment.