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

Commit bump is happening on #none# bump when no change to code coverage has occurred #146

Open
juwara0 opened this issue Mar 19, 2018 · 0 comments

Comments

@juwara0
Copy link
Contributor

juwara0 commented Mar 19, 2018

#Issue Description:

This issue was encountered with pr-bumper version 3.

A PR was created and merged with #none# as the semver. This repo also has code coverage validation enabled. (ciena-frost/ember-frost-core#550)

https://github.com/ciena-frost/ember-frost-core/blob/b58b91d279a23b8c563d363c37c6a306f2cb84dc/.pr-bumper.json#L6-L8

https://github.com/ciena-frost/ember-frost-core/blob/b58b91d279a23b8c563d363c37c6a306f2cb84dc/package.json#L99-L101

screen shot 2018-03-19 at 1 52 45 pm

Error message while running merge build

https://travis-ci.org/ciena-frost/ember-frost-core/jobs/355431705

The command "$(npm root -g)/pr-bumper/.travis/maybe-test.sh" exited with 0.
0.49s$ .travis/maybe-check-coverage.sh
pr-bumper: Code Coverage: `94.22%` (no change)
The command ".travis/maybe-check-coverage.sh" exited with 0.
1.12s$ .travis/maybe-bump-version.sh
pr-bumper: ERROR: Command failed: git commit -m "[pr-bumper] Automated code coverage update" -m "From CI build 1380"
The command ".travis/maybe-bump-version.sh" exited with 1.
cache.2
store build cache
0.01s
15.73schanges detected, packing new archive
.
.
uploading archive
Done. Your build exited with 1.

It appears that what might be happening is that the code coverage information is being written back to the package.json file even when the coverage pct number did not change. This would cause the info.modifiedFiles.length not be equal to 0. (https://github.com/ciena-blueplanet/pr-bumper/blob/master/lib/bumper.js#L339)

A possible fix might be to check to see if the coverage pct changed, and if not, do not write out and update modifiedFiles: In this stanza here: https://github.com/ciena-blueplanet/pr-bumper/blob/master/lib/bumper.js#L532-L535 there should probably be a check to see if it changed, and, if not, don’t write it out and update modifiedFiles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant