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

Code Coverage update #1022

Merged
merged 1 commit into from
Jan 25, 2021
Merged

Conversation

bitwiseman
Copy link
Member

Description

Trying to raise the minimum bar for coverage to 50%

Before submitting a PR:

We love getting PRs, but we hate asking people for the same basic changes every time.

  • Push your changes to a branch other than master. Create your PR from that branch.
  • Add JavaDocs and other comments
  • Write tests that run and pass in CI. See CONTRIBUTING.md for details on how to capture snapshot data.
  • Run mvn clean compile locally. This may reformat your code, commit those changes.
  • Run mvn -D enable-ci clean install site locally. If this command doesn't succeed, your change will not pass CI.

When creating a PR:

  • Fill in the "Description" above.
  • Enable "Allow edits from maintainers".

This change adds or update a swath of tests to push method code coverage numbers up.
Yes, method coverage is not super meaningful, but it is one metric that we can use to
ensure at least minimal coverage of this library.

Almost no product changes in here.
@bitwiseman bitwiseman marked this pull request as ready for review January 25, 2021 20:09
Comment on lines +575 to +576
<!-- Only fail code coverage on non-windows machines -->
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
Copy link
Member Author

Choose a reason for hiding this comment

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

Rather than exclude some classes from measurement due to tests not running on windows, don't run coverage on windows.

Comment on lines +23 to +26

GitHub getRoot() {
return root;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this internal method for tests to use, in preparation changing root to private.

@@ -192,8 +205,7 @@ public GHPullRequestReviewComment reply(String body) throws IOException {
return owner.root.createRequest()
.method("POST")
.with("body", body)
.with("in_reply_to", getId())
.withUrlPath(getApiRoute() + "/comments")
.withUrlPath(getApiRoute(true) + "/replies")
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only real product change. Bug fixed!

@bitwiseman bitwiseman merged commit 5166c92 into hub4j:master Jan 25, 2021
@bitwiseman bitwiseman deleted the task/enum-coverage branch January 25, 2021 20:24
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

Successfully merging this pull request may close these issues.

1 participant