Skip to content

Commit

Permalink
Add a danger check for PR titles that contain a "Fixes #1234" prefix.
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave committed Aug 13, 2024
1 parent 4519275 commit 6172a61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dangerfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ if hasPngs {
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 = /Fixes #\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.")
}

Expand Down

0 comments on commit 6172a61

Please sign in to comment.