From 591c046905d9712bd34a911a998b664af3d0e4fc Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Tue, 17 Mar 2026 14:08:48 +0100 Subject: [PATCH 1/2] CI: add PR hygiene checks using dannywillems/toolbox Add pr-hygiene workflow that downloads scripts from the toolbox repository: - check-pr-size.sh: warn at 300 lines, fail at 500 - check-title-length.sh: commit titles <= 80 chars - check-no-fixup.sh: no fixup/squash/WIP commits - check-commit-body.sh: body required for 20+ line changes Closes #81 --- .github/workflows/pr-hygiene.yaml | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/pr-hygiene.yaml diff --git a/.github/workflows/pr-hygiene.yaml b/.github/workflows/pr-hygiene.yaml new file mode 100644 index 0000000..d747a26 --- /dev/null +++ b/.github/workflows/pr-hygiene.yaml @@ -0,0 +1,54 @@ +name: PR hygiene checks +on: + pull_request: + types: [assigned, opened, synchronize, reopened] + branches: + - main + merge_group: + types: [checks_requested] + +jobs: + check-pr-size: + name: Check PR size + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Download script + run: | + curl -sSLO \ + "https://raw.githubusercontent.com/dannywillems/toolbox/main/pr-hygiene/check-pr-size.sh" + chmod +x check-pr-size.sh + - name: Check PR size + run: > + ./check-pr-size.sh + "${{ github.event.pull_request.base.sha }}" + + check-commit-messages: + name: Check commit messages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Download scripts + run: | + for script in check-title-length.sh \ + check-no-fixup.sh check-commit-body.sh; do + curl -sSLO \ + "https://raw.githubusercontent.com/dannywillems/toolbox/main/pr-hygiene/${script}" + chmod +x "${script}" + done + - name: Check title length + run: > + ./check-title-length.sh + "${{ github.event.pull_request.base.sha }}" + - name: Check no fixup/WIP commits + run: > + ./check-no-fixup.sh + "${{ github.event.pull_request.base.sha }}" + - name: Check commit body on large changes + run: > + ./check-commit-body.sh + "${{ github.event.pull_request.base.sha }}" From 302b0bae1dcdf39df8f7789d70e0b729ef014280 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Tue, 17 Mar 2026 14:09:26 +0100 Subject: [PATCH 2/2] CHANGELOG: add PR hygiene checks --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b882d0..4e2d23f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to ## [Unreleased] +### Infrastructure + +- CI: add PR hygiene checks using dannywillems/toolbox ([591c046], [#81]) + ### Added - AsyncClient with full async/await support using httpx @@ -90,6 +94,7 @@ and this project adheres to [87b68f6]: https://github.com/LeakIX/LeakIXClient-Python/commit/87b68f6 +[591c046]: https://github.com/LeakIX/LeakIXClient-Python/commit/591c046 [c62d2a4]: https://github.com/LeakIX/LeakIXClient-Python/commit/c62d2a4 [01b280f]: https://github.com/LeakIX/LeakIXClient-Python/commit/01b280f [aa9cc03]: https://github.com/LeakIX/LeakIXClient-Python/commit/aa9cc03 @@ -122,3 +127,4 @@ and this project adheres to [#76]: https://github.com/LeakIX/LeakIXClient-Python/pull/76 [#78]: https://github.com/LeakIX/LeakIXClient-Python/pull/78 [#80]: https://github.com/LeakIX/LeakIXClient-Python/pull/80 +[#81]: https://github.com/LeakIX/LeakIXClient-Python/issues/81