Fix Danger's changelog detection.

This commit is contained in:
Doug 2022-06-08 11:38:53 +01:00 committed by Doug
parent d7fae1ad7d
commit 7a458377d6
2 changed files with 3 additions and 2 deletions

View File

@ -17,9 +17,9 @@ if danger.github.pullRequest.body?.isEmpty ?? true {
// Request a changelog for each app change
let editedFiles = danger.git.modifiedFiles + danger.git.createdFiles
let hasChangelog = danger.git.modifiedFiles.contains("/changelog.d")
let changelogFiles = editedFiles.filter { $0.hasPrefix("changelog.d/") }
if editedFiles.count > 0 && !hasChangelog {
if editedFiles.count > 0 && changelogFiles.isEmpty {
warn("Please add a changelog.")
}

1
changelog.d/74.build Normal file
View File

@ -0,0 +1 @@
Fix Danger's changelog detection.