Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
- ".github/workflows/changelog.yml"
- "CHANGELOG.md"
- "xtask/**/*"
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled

env:
#
Expand Down Expand Up @@ -38,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' || '' }}
8 changes: 7 additions & 1 deletion xtask/src/changelog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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(())
}
Expand Down
2 changes: 2 additions & 0 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Commands:

`<to_commit>` 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.
Expand Down