2018-01-25 20:07:51 +01:00
|
|
|
import { danger, fail } from "danger"
|
2018-01-25 16:24:05 +01:00
|
|
|
|
2018-01-25 19:51:23 +01:00
|
|
|
// Check if the CHANGELOG.md file has been edited
|
2018-01-25 20:07:51 +01:00
|
|
|
const changelogEdited = danger.git.modified_files.includes("CHANGELOG.md")
|
2018-01-25 19:43:09 +01:00
|
|
|
|
2018-01-25 19:51:23 +01:00
|
|
|
// Fail the build and post a comment reminding submitters to do so if it wasn't changed
|
|
|
|
if (!changelogEdited) {
|
2018-01-25 20:45:25 +01:00
|
|
|
fail("Please include an updated `CHANGELOG.md` file.<br>This way we can keep track of all the contributions.")
|
2018-01-25 16:24:05 +01:00
|
|
|
}
|