Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Samasaur1 opened this issue Jun 29, 2022 · 0 comments
Labels
enhancement New feature or request internal change Something that only changes on the inside low priority Something that is not urgent

Comments

@Samasaur1
Copy link
Owner

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.

@Samasaur1 Samasaur1 added enhancement New feature or request low priority Something that is not urgent internal change Something that only changes on the inside labels Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal change Something that only changes on the inside low priority Something that is not urgent
Projects
None yet
Development

No branches or pull requests

1 participant