Add a danger check for PR titles that contain a "Fixes #1234" prefix. (#3161)

This commit is contained in:
Doug
2024-08-13 13:22:08 +01:00
committed by GitHub
parent 1ad361a6e8
commit 1384a720b8
+2 -1
View File
@@ -80,7 +80,8 @@ if hasPngs {
warn("You seem to have made changes to some resource images. Please consider using an SVG or PDF.") warn("You seem to have made changes to some resource images. Please consider using an SVG or PDF.")
} }
if danger.github.pullRequest.title.hasSuffix("…") { let fixesRegex = try! Regex("(Fixes|Fix) #\\d+")
if danger.github.pullRequest.title.hasSuffix("…") || danger.github.pullRequest.title.starts(with: fixesRegex) {
fail("Please provide a complete title that can be used as a changelog entry.") fail("Please provide a complete title that can be used as a changelog entry.")
} }