From bc1bc38731c06c07cb7959b6d2b149a606c11ae4 Mon Sep 17 00:00:00 2001 From: Tom Krizek Date: Thu, 26 Jan 2023 13:03:12 +0100 Subject: [PATCH] danger: update CHANGES rule to work with -S edition When updating the -S edition, the CHANGES.SE file is modified. Make sure danger accepts that. (cherry picked from commit 1939e585c0c209b4b1790c1d1340a3adc6f804da) --- dangerfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dangerfile.py b/dangerfile.py index 405282adf4..0e8d377410 100644 --- a/dangerfile.py +++ b/dangerfile.py @@ -286,7 +286,7 @@ elif not approved: # * The merge request adds a new CHANGES entry that is not a placeholder and # does not contain any GitLab/RT issue/MR identifiers. -changes_modified = "CHANGES" in modified_files +changes_modified = "CHANGES" in modified_files or "CHANGES.SE" in modified_files no_changes_label_set = "No CHANGES" in mr_labels if not changes_modified and not no_changes_label_set: fail( @@ -299,7 +299,7 @@ if changes_modified and no_changes_label_set: "Revert `CHANGES` modifications or unset the *No Changes* label." ) -changes_added_lines = added_lines(target_branch, ["CHANGES"]) +changes_added_lines = added_lines(target_branch, ["CHANGES", "CHANGES.SE"]) placeholders_added = lines_containing(changes_added_lines, "[placeholder]") identifiers_found = filter(changes_issue_or_mr_id_regex.search, changes_added_lines) if changes_added_lines: