]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Warn about release notes without CHANGES entry
authorPetr Špaček <pspacek@isc.org>
Thu, 7 Mar 2024 15:58:29 +0000 (16:58 +0100)
committerMichał Kępień <michal@isc.org>
Fri, 29 Mar 2024 09:45:06 +0000 (10:45 +0100)
(cherry picked from commit 0ba29730f7b9857aa5a11d755dcc728416c763ee)

dangerfile.py

index 8b7283e37a60d55976929bfa8a672d345388f703..3a4ef3fb678b8c8188a5b5dd0b2be613b4f365f0 100644 (file)
@@ -339,6 +339,11 @@ if changes_added_lines:
 #       RR types are a user-visible change (and so is removing support for
 #       existing ones).
 #
+#     * "Release notes" and "No CHANGES" labels are both set at the same time.
+#       (If something is worth a release note, it should surely show up in
+#       CHANGES.) MRs with certain labels set ("Documentation", "Release") are
+#       exempt because these are typically used during release process.
+#
 # - WARN if any of the following is true:
 #
 #     * This merge request does not update release notes and has the "Customer"
@@ -378,6 +383,15 @@ if release_notes_changed and not release_notes_label_set:
         "This merge request modifies release notes. "
         "Revert release note modifications or set the *Release Notes* label."
     )
+if (
+    release_notes_label_set
+    and no_changes_label_set
+    and not ("Documentation" in mr_labels or "Release" in mr_labels)
+):
+    fail(
+        "This merge request is labeled with both *Release notes* and *No CHANGES*. "
+        "A user-visible change should also be mentioned in the `CHANGES` file."
+    )
 
 if release_notes_changed:
     modified_or_new_files = danger.git.modified_files + danger.git.created_files