From 01c3a60626a14263d1078c7e984b1e644b25a023 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Mon, 16 Feb 2026 13:34:06 -0800 Subject: [PATCH] Do not encourage merging with CI failure Replace "Merging is discouraged but would not break the base branch" with "Please fix them before merging" in the DiscouragedPatternedIntroduced status message. With required status checks now in place, the old message incorrectly reassured contributors that merging was safe despite a red CI check. Fixes #174 --- src/status.rs | 6 +++--- tests/manual-definition/expected | 2 +- tests/move-to-non-by-name/expected | 2 +- tests/new-package-non-by-name/expected | 2 +- tests/override-empty-arg/expected | 2 +- tests/sorted-order/expected | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/status.rs b/src/status.rs index 5a706337..3120cc84 100644 --- a/src/status.rs +++ b/src/status.rs @@ -20,8 +20,8 @@ pub enum Status { /// branch would break. ProblemsIntroduced(Vec), - /// This PR introduces additional instances of discouraged patterns. Merging is discouraged but - /// would not break the base branch. + /// This PR introduces additional instances of discouraged patterns. Please fix them before + /// merging. DiscouragedPatternedIntroduced(Vec), /// Some other error occurred. @@ -70,7 +70,7 @@ impl Status { ), Self::DiscouragedPatternedIntroduced(..) => maybe_yellow( "This PR introduces additional instances of discouraged patterns as listed above. \ - Merging is discouraged but would not break the base branch.", + Please fix them before merging.", ), }; fmt::Display::fmt(&message, f) diff --git a/tests/manual-definition/expected b/tests/manual-definition/expected index 915cb8c7..a5f3e803 100644 --- a/tests/manual-definition/expected +++ b/tests/manual-definition/expected @@ -18,4 +18,4 @@ Such a definition is provided automatically and therefore not necessary. Please remove it. -This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. +This PR introduces additional instances of discouraged patterns as listed above. Please fix them before merging. diff --git a/tests/move-to-non-by-name/expected b/tests/move-to-non-by-name/expected index 0dc6989e..4dc2228c 100644 --- a/tests/move-to-non-by-name/expected +++ b/tests/move-to-non-by-name/expected @@ -10,4 +10,4 @@ - Attribute `pkgs.foo4` was previously defined in pkgs/by-name/fo/foo4/package.nix, but is now manually defined as `callPackage ./with-config.nix { ... }` in pkgs/top-level/all-packages.nix. While the manual `callPackage` is still needed, it's not necessary to move the package files. -This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. +This PR introduces additional instances of discouraged patterns as listed above. Please fix them before merging. diff --git a/tests/new-package-non-by-name/expected b/tests/new-package-non-by-name/expected index 43e9279c..940da433 100644 --- a/tests/new-package-non-by-name/expected +++ b/tests/new-package-non-by-name/expected @@ -18,4 +18,4 @@ See `pkgs/by-name/README.md` for more details. Since the second `callPackage` argument is not `{ }`, the manual `callPackage` in pkgs/top-level/all-packages.nix is still needed. -This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. +This PR introduces additional instances of discouraged patterns as listed above. Please fix them before merging. diff --git a/tests/override-empty-arg/expected b/tests/override-empty-arg/expected index ade92a7f..b7367abe 100644 --- a/tests/override-empty-arg/expected +++ b/tests/override-empty-arg/expected @@ -8,4 +8,4 @@ Such a definition is provided automatically and therefore not necessary. Please remove it. -This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. +This PR introduces additional instances of discouraged patterns as listed above. Please fix them before merging. diff --git a/tests/sorted-order/expected b/tests/sorted-order/expected index 8cdd2c77..701c7c98 100644 --- a/tests/sorted-order/expected +++ b/tests/sorted-order/expected @@ -28,4 +28,4 @@ See `pkgs/by-name/README.md` for more details. Since the second `callPackage` argument is `{ }`, no manual `callPackage` in pkgs/top-level/all-packages.nix is needed anymore. -This PR introduces additional instances of discouraged patterns as listed above. Merging is discouraged but would not break the base branch. +This PR introduces additional instances of discouraged patterns as listed above. Please fix them before merging.