chore(CI): add a check for CHANGELOG by dangerjs#456
Conversation
Codecov Report
@@ Coverage Diff @@
## master #456 +/- ##
=======================================
Coverage 88.32% 88.32%
=======================================
Files 42 42
Lines 1456 1456
Branches 187 212 +25
=======================================
Hits 1286 1286
Misses 165 165
Partials 5 5Continue to review full report at Codecov.
|
Generated by 🚫 dangerJS |
|
Wow-wow, really cool ❤️ |
|
CircleCI reconfigured to build PRs only. Ready for review. |
layershifter
left a comment
There was a problem hiding this comment.
Cool job 👍
Only one thing, please update a PR's title, something like: chore(CI): add a check for CHANGELOG by dangerjs
| name: Project Tests | ||
| command: yarn test:projects:cra-ts | ||
| - run: | ||
| name: Danger JS |
There was a problem hiding this comment.
would suggest some other name that will provide the intent of this step, like 'Conventions Tests'
There was a problem hiding this comment.
I would rather leave it as it is (for now). I intentionally used that name to make it clear that the step is driven by dangerfile.ts.
There was a problem hiding this comment.
lets discuss offline - cannot agree here, as there are other steps that are driven by dedicated tools (like Screener), but so far we have used semantics-based approach for naming.
dangerfile.ts
Outdated
| const hasChangelog = danger.git.modified_files.some(f => f === 'CHANGELOG.md') | ||
|
|
||
| if (!hasChangelog) { | ||
| warn('Please add a changelog entry for your changes.') |
There was a problem hiding this comment.
maybe something like Ensure that CHANGELOG is not updated intentionally. or There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR. The benefit is that we won't blindly suggest to update CHANGELOG for those cases where it might not be necessary
This PR adds Danger JS.
Danger JS runs tests as part of CI and writes results message back to the PR:

It can even fail the CI build in case of an error:

Currently there are no meaningful tests in our
dangerfile.tsbut we plan to use the workflow for bundle size checks (#97).Caveats
By design danger can run only on CI builds related to a PR and refuses to run on a branch build with no associated PR:

This is not compatible with our current CI configuration:
