Skip to content

Commit

Permalink
Add changelog failures with Danger.
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave committed Jun 25, 2024
1 parent 3f9e523 commit a01627d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Dangerfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,11 @@ let hasPngs = !editedFiles.filter { $0.lowercased().contains(".xcassets") && $0.
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("") {
fail("Please provide a complete title that can be used as a changelog entry.")
}

if danger.github.issue.labels.filter({ $0.hasPrefix("pr-") }).count != 1 {
fail("Please add a pr- label to categorise the changelog entry.")
}

0 comments on commit a01627d

Please sign in to comment.