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
Allowed creation of PR review comments using line number. Fixes #1645 #1649
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you’ll need to support both line number and position, for backwards compatibility.
They can both be nullable. So change position
to be Integer
and overload the comment
method with a version that takes both position
and line
.
It would be good to support start_line
and side
too. This allows for richer multi-line comments.
github docs say
so would it work if I keep the old method (with |
yes, that'd work |
Allowed creating PR Review comments by either line or position, added start_line and side options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/main/java/org/kohsuke/github/GHPullRequestReviewBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/org/kohsuke/github/GHPullRequestReviewBuilder.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, minor suggestions.
Add tests to exercise the new method.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1649 +/- ##
============================================
- Coverage 80.04% 79.74% -0.30%
+ Complexity 2231 2197 -34
============================================
Files 215 209 -6
Lines 6760 6686 -74
Branches 365 364 -1
============================================
- Hits 5411 5332 -79
- Misses 1134 1140 +6
+ Partials 215 214 -1
☔ View full report in Codecov by Sentry. |
Co-authored-by: Liam Newman <bitwiseman@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there some kind of merge conflict with all the .json
files?
I never said this, but the use case I have is making multi line suggestions.
@alexec @AlkahtaniHisham |
LGTM |
@AlkahtaniHisham We need new test data. |
@bitwiseman I can help record the test data if needed. I understand I would need access to hub4j-test-org to record and check-in interactions with that account. |
@gilday Invitation sent for the test org. |
Description
Fixes #1645
Updated org.kohsuke.github.GHPullRequestReviewBuilder to allow creating pull request review comments by line, instead of the deprecated parameter position.
There were some mistakes in my previous PR so I redid it.
Before submitting a PR:
mvn -D enable-ci clean install site
locally. If this command doesn't succeed, your change will not pass CI.main
. You will create your PR from that branch.When creating a PR: