From 31a252f56dd3e1cd154ff72d1fd71637f9c10192 Mon Sep 17 00:00:00 2001 From: Tobias Brox Date: Thu, 12 Nov 2026 11:38:59 +0100 Subject: [PATCH] ci: no news fragment check for test-only PRs A pull request touching only tests/ and CONTRIBUTING.md changes nothing a user sees, yet the changelog check went red on it until someone added the skip-changelog label. The workflow now ignores those paths. CONTRIBUTING.md is exempt too because contributor docs are not part of what a user of the library reads. Prompt: test commits does not need a news fragment (maybe the check for this can be adjusted so it doesn't go in red for test commits?) Assisted-By: Claude Opus 5.5 Reviewed-by: Tobias Brox --- .github/workflows/changelog.yml | 8 +++++++- CONTRIBUTING.md | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 6d4c198..18cb8c1 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,10 +1,16 @@ name: Changelog # Separate from tests.yml so that adding or removing the skip-changelog -# label re-runs only this check, not the whole test matrix. +# label re-runs only this check, not the whole test matrix. A pull request +# touching only tests and contributor docs changes nothing a user sees. +# Such a pull request gets no check run at all, so do not make this check +# required in branch protection: it would wait forever for one. on: pull_request: types: [opened, synchronize, reopened, labeled, unlabeled] + paths-ignore: + - "tests/**" + - "CONTRIBUTING.md" concurrency: group: changelog-${{ github.ref }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8396099..18ed2df 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,8 @@ named `..rst`, for example `42.bugfix.rst`. The types are listed under `[tool.towncrier]` in `pyproject.toml`: `breaking`, `removal`, `feature`, `bugfix`, `documentation`, `deps`, `internal`, `chore` and `security`. `towncrier create` makes the file for you. A pull request -with nothing worth mentioning can be labelled `skip-changelog`. +touching nothing but `tests/` or this file is not checked for one, and any +other with nothing worth mentioning can be labelled `skip-changelog`. ## Development setup