From 241cabe0b11432b3d0dd7181213435371e0d93e4 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Mon, 16 Dec 2024 18:20:21 +0000 Subject: [PATCH] expand message with example --- src/AutoMerge/guidelines.jl | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/AutoMerge/guidelines.jl b/src/AutoMerge/guidelines.jl index 7806441f..abf37552 100644 --- a/src/AutoMerge/guidelines.jl +++ b/src/AutoMerge/guidelines.jl @@ -337,10 +337,35 @@ end function meets_breaking_explanation_check(labels::Vector, body::AbstractString) if any(==("BREAKING"), labels) release_notes = get_release_notes(body) + example_detail = """ +
Example of adding release notes with breaking notice + ``` + @JuliaRegistrator register + + Release notes: + + ## Breaking changes + + - Explanation of breaking change, ideally with upgrade tips + - ... + ``` +
+ """ if release_notes === nothing return false, "This is a breaking change, but no release notes have been provided." + msg = """ + This is a breaking change, but no release notes have been provided. + Please add releas notes that explain the breaking change. + $(example_detail) + """ + return false, msg elseif !occursin(r"breaking", lowercase(release_notes)) - return false, "This is a breaking change, but the release notes do not mention it." + msg = """ + This is a breaking change, but the release notes do not mention it. + Please add a mention of the breaking change to the release notes. + $(example_detail) + """ + return false, msg else return true, "" end