From 6b9a08e3cc1fed3bce8c4c3d53f8eedce50151c8 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Wed, 22 Oct 2025 14:10:00 -0400 Subject: [PATCH 1/3] refactor(CHANGELOG): expand default `pull_request` triggers --- .github/workflows/changelog.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index e0c41f0116..bdb20b5abd 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -6,6 +6,10 @@ on: - ".github/workflows/changelog.yml" - "CHANGELOG.md" - "xtask/**/*" + types: + - opened + - synchronize + - reopened env: # From 46eb517bc9a768d0385b4a0f6427a733388f4eff Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Wed, 22 Oct 2025 14:21:47 -0400 Subject: [PATCH 2/3] test(CHANGELOG): add `--allow-released-changes` to `cargo xtask changelog` --- xtask/src/changelog.rs | 8 +++++++- xtask/src/main.rs | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/xtask/src/changelog.rs b/xtask/src/changelog.rs index 09c1990b58..6143917fe1 100644 --- a/xtask/src/changelog.rs +++ b/xtask/src/changelog.rs @@ -6,6 +6,7 @@ use xshell::Shell; pub(crate) fn check_changelog(shell: Shell, mut args: Arguments) -> anyhow::Result<()> { const CHANGELOG_PATH_RELATIVE: &str = "./CHANGELOG.md"; + let allow_released_changes = args.contains("--allow-released-changes"); let from_branch = args .free_from_str() @@ -72,7 +73,12 @@ pub(crate) fn check_changelog(shell: Shell, mut args: Arguments) -> anyhow::Resu "one or more checks against `{}` failed; see above for details", CHANGELOG_PATH_RELATIVE, ); - Err(anyhow::Error::msg(msg)) + if allow_released_changes { + log::warn!("{msg}"); + Ok(()) + } else { + Err(anyhow::Error::msg(msg)) + } } else { Ok(()) } diff --git a/xtask/src/main.rs b/xtask/src/main.rs index e5e0200aef..36c1227e35 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -53,6 +53,8 @@ Commands: `` is the tip of the `git diff` that will be used for checking (1). + --allow-released-changes Only reports issues as warnings, rather than reporting errors and forcing a non-zero exit code. + miri Run all miri-compatible tests under miri. Requires a nightly toolchain with the x86_64-unknown-linux-gnu target and miri component installed. From 6c2b06c7f3a54b2a2ff01cad4998bf7011644266 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Wed, 22 Oct 2025 14:21:47 -0400 Subject: [PATCH 3/3] test(CHANGELOG): add `changelog: released entry changed` label escape hatch for `--allow-released-changes` --- .github/workflows/changelog.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index bdb20b5abd..9250eaf524 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -10,6 +10,8 @@ on: - opened - synchronize - reopened + - labeled + - unlabeled env: # @@ -42,6 +44,7 @@ jobs: with: fetch-depth: 0 + # NOTE: Keep label name(s) in sync. with `xtask`'s implementation. - name: Run `cargo xtask changelog …` run: | - cargo xtask changelog "origin/${{ github.event.pull_request.base.ref }}" + cargo xtask changelog "origin/${{ github.event.pull_request.base.ref }}" ${{ contains(github.event.pull_request.labels.*.name, 'changelog: released entry changed') && '--allow-released-changes' || '' }}