Skip to content

Danger should not tell PR authors to put changes in the Upcoming section of the changelog if it is a new version PR #105

@Samasaur1

Description

@Samasaur1

When making a PR to master that is not a new version, if the author has not yet updated the CHANGELOG, Danger will tell them to "Put your changes in the UPCOMING section". This is what we want. However, this same message is outputted even if the PR is for a new version (in which case everything in the UPCOMING section, along with any new information, should be under a version heading).

Here's the part of the Dangerfile that controls this output:

DiceKit/Dangerfile.swift

Lines 92 to 101 in b91141b

// MARK: Changelog updated
if editedFiles.contains("CHANGELOG.md") {
message("The CHANGELOG was updated")
} else {
if FileManager.default.fileExists(atPath: "CHANGELOG.md") {
fail("The CHANGELOG was not updated! (put your changes in the UPCOMING section)")
} else {
warn("There is no CHANGELOG!")
}
}

We should put these CHANGELOG checks inside the if-else statement checking new versions, in order to give more useful output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinternal changeSomething that only changes on the insidelow prioritySomething that is not urgent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions