# linked with the `Closes` or `Fixes` keyword in the MR description.
release_notes_changed = mr_title_audience in ["usr", "pkg"]
-release_notes_label_set = "Release Notes" in mr_labels
if not release_notes_changed:
- if release_notes_label_set:
- fail(
- "This merge request has the *Release Notes* label set. "
- "Update the MR title to include `usr:`|`pkg:` audience or "
- "unset the *Release Notes* label."
- )
- elif "Customer" in mr_labels:
+ if "Customer" in mr_labels and not release_notes_changed:
warn(
"This merge request has the *Customer* label set. "
"Update the MR title to include `usr:`|`pkg:` audience "
"means that it adds support for a new RR type or removes support "
"for an existing one. Update the MR title to include `usr:` audience."
)
-if release_notes_changed and not release_notes_label_set:
- fail(
- "The MR title produces a release note. Set the *Release Notes* label "
- "or remove the `usr:`|`pkg:` audience from the MR title."
- )
-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 changelog."
- )
if release_notes_changed and not mr_issue_link_regex.search(
danger.gitlab.mr.description