-
Notifications
You must be signed in to change notification settings - Fork 775
fix: GHPullRequestReviewComment.getLine() returning -1 #2188
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fe5bd23
fix: GHPullRequestReviewComment.getLine() returning -1
Anonycoders e4b6b37
chore: address review comments
Anonycoders 5f9fed5
fix: add ReviewComment reflection/serialization
Anonycoders b922e2b
fix: cover more methods in thest
Anonycoders 3d8f059
fix: cover more methods in test
Anonycoders daf7583
fix: remove getUser method call due to missing stub
Anonycoders File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -218,7 +218,13 @@ public long getInReplyToId() { | |
| /** | ||
| * Gets The line of the blob to which the comment applies. The last line of the range for a multi-line comment. | ||
| * | ||
| * @return the line to which the comment applies | ||
| * <p> | ||
| * This field is not available on {@link GHPullRequestReview.ReviewComment} objects returned by | ||
| * {@link GHPullRequestReview#listReviewComments()}. Use | ||
| * {@link GHPullRequestReview.ReviewComment#readPullRequestReviewComment()} or | ||
| * {@link GHPullRequest#listReviewComments()} to obtain this value. | ||
| * | ||
| * @return the line to which the comment applies, or -1 if not available | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure we need these comments any more, since the only place that this would occur now returns a No harm making it very clear how bizarre the API is in this area. 😄 |
||
| */ | ||
| public int getLine() { | ||
| return line; | ||
|
|
@@ -236,7 +242,13 @@ public String getOriginalCommitId() { | |
| /** | ||
| * Gets The line of the blob to which the comment applies. The last line of the range for a multi-line comment. | ||
| * | ||
| * @return the line to which the comment applies | ||
| * <p> | ||
| * This field is not available on {@link GHPullRequestReview.ReviewComment} objects returned by | ||
| * {@link GHPullRequestReview#listReviewComments()}. Use | ||
| * {@link GHPullRequestReview.ReviewComment#readPullRequestReviewComment()} or | ||
| * {@link GHPullRequest#listReviewComments()} to obtain this value. | ||
| * | ||
| * @return the line to which the comment applies, or -1 if not available | ||
| */ | ||
| public int getOriginalLine() { | ||
| return originalLine; | ||
|
|
@@ -254,7 +266,13 @@ public int getOriginalPosition() { | |
| /** | ||
| * Gets The first line of the range for a multi-line comment. | ||
| * | ||
| * @return the original start line | ||
| * <p> | ||
| * This field is not available on {@link GHPullRequestReview.ReviewComment} objects returned by | ||
| * {@link GHPullRequestReview#listReviewComments()}. Use | ||
| * {@link GHPullRequestReview.ReviewComment#readPullRequestReviewComment()} or | ||
| * {@link GHPullRequest#listReviewComments()} to obtain this value. | ||
| * | ||
| * @return the original start line, or -1 if not available or not a multi-line comment | ||
| */ | ||
| public int getOriginalStartLine() { | ||
| return originalStartLine != null ? originalStartLine : -1; | ||
|
|
@@ -318,9 +336,15 @@ public GHPullRequestReviewCommentReactions getReactions() { | |
|
|
||
| /** | ||
| * Gets The side of the diff to which the comment applies. The side of the last line of the range for a multi-line | ||
| * comment | ||
| * comment. | ||
| * | ||
| * @return {@link Side} the side if the diff to which the comment applies | ||
| * <p> | ||
| * This field is not available on {@link GHPullRequestReview.ReviewComment} objects returned by | ||
| * {@link GHPullRequestReview#listReviewComments()}. Use | ||
| * {@link GHPullRequestReview.ReviewComment#readPullRequestReviewComment()} or | ||
| * {@link GHPullRequest#listReviewComments()} to obtain this value. | ||
| * | ||
| * @return {@link Side} the side of the diff to which the comment applies, or {@link Side#UNKNOWN} if not available | ||
| */ | ||
| public Side getSide() { | ||
| return Side.from(side); | ||
|
|
@@ -329,7 +353,13 @@ public Side getSide() { | |
| /** | ||
| * Gets The first line of the range for a multi-line comment. | ||
| * | ||
| * @return the start line | ||
| * <p> | ||
| * This field is not available on {@link GHPullRequestReview.ReviewComment} objects returned by | ||
| * {@link GHPullRequestReview#listReviewComments()}. Use | ||
| * {@link GHPullRequestReview.ReviewComment#readPullRequestReviewComment()} or | ||
| * {@link GHPullRequest#listReviewComments()} to obtain this value. | ||
| * | ||
| * @return the start line, or -1 if not available or not a multi-line comment | ||
| */ | ||
| public int getStartLine() { | ||
| return startLine != null ? startLine : -1; | ||
|
|
@@ -338,7 +368,13 @@ public int getStartLine() { | |
| /** | ||
| * Gets The side of the first line of the range for a multi-line comment. | ||
| * | ||
| * @return {@link Side} the side of the first line | ||
| * <p> | ||
| * This field is not available on {@link GHPullRequestReview.ReviewComment} objects returned by | ||
| * {@link GHPullRequestReview#listReviewComments()}. Use | ||
| * {@link GHPullRequestReview.ReviewComment#readPullRequestReviewComment()} or | ||
| * {@link GHPullRequest#listReviewComments()} to obtain this value. | ||
| * | ||
| * @return {@link Side} the side of the first line, or {@link Side#UNKNOWN} if not available | ||
| */ | ||
| public Side getStartSide() { | ||
| return Side.from(startSide); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'm surprised this isn't triggering a build break due to this being breaking api change.
I need to look at why it isn't before merging this change.