Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

chore(CI): add a check for CHANGELOG by dangerjs#456

Merged
miroslavstastny merged 6 commits intomasterfrom
chore/dangerjs
Nov 26, 2018
Merged

chore(CI): add a check for CHANGELOG by dangerjs#456
miroslavstastny merged 6 commits intomasterfrom
chore/dangerjs

Conversation

@miroslavstastny
Copy link
Member

@miroslavstastny miroslavstastny commented Nov 9, 2018

This PR adds Danger JS.

Danger JS runs tests as part of CI and writes results message back to the PR:
image

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

Currently there are no meaningful tests in our dangerfile.ts but 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:
image

This is not compatible with our current CI configuration:
image

@codecov
Copy link

codecov bot commented Nov 9, 2018

Codecov Report

Merging #456 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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        5

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f190e0b...037c987. Read the comment docs.

@DustyTheBot
Copy link
Collaborator

DustyTheBot commented Nov 9, 2018

Warnings
⚠️ There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR.

Generated by 🚫 dangerJS

@layershifter
Copy link
Member

Wow-wow, really cool ❤️

@miroslavstastny
Copy link
Member Author

CircleCI reconfigured to build PRs only. Ready for review.

Copy link
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool job 👍

Only one thing, please update a PR's title, something like: chore(CI): add a check for CHANGELOG by dangerjs

@miroslavstastny miroslavstastny changed the title Chore/dangerjs chore(CI): add a check for CHANGELOG by dangerjs Nov 22, 2018
name: Project Tests
command: yarn test:projects:cra-ts
- run:
name: Danger JS
Copy link
Contributor

@kuzhelov kuzhelov Nov 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would suggest some other name that will provide the intent of this step, like 'Conventions Tests'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@miroslavstastny miroslavstastny merged commit bcf62f3 into master Nov 26, 2018
@miroslavstastny miroslavstastny deleted the chore/dangerjs branch November 26, 2018 06:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants