-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add Pull.head/base, which return (newly-added) PullRef #1125
Conversation
@dmarkov Please, find a reviewer for this. |
@cvrebert I will find a reviewer for your pull requests shortly, thanks for contribution! |
@pinaf please review, thanks |
base and head should be objects, not strings canonicalize head label to "user:branch" format
@pinaf Friendly ping. |
/** | ||
* Encapsulated pull request ref. | ||
*/ | ||
private final transient PullRef pullref; |
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.
@cvrebert I'd rename this to ref
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.
@pinaf That would conflict with the ref()
method
@cvrebert taking a look now |
).json(); | ||
final JsonObjectBuilder json = Json.createObjectBuilder(); | ||
for (final Map.Entry<String, JsonValue> val : obj.entrySet()) { | ||
json.add(val.getKey(), val.getValue()); |
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.
@cvrebert you are no longer adding all key/values as before. don't you think this might be an issue?
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.
@pinaf Well, all the unit tests still pass, so no.
@cvrebert still a few references to static fields in |
@pinaf Made the |
@pinaf Moved the various method calls up. |
@pinaf Fixed/responded to all your previous comments. |
@cvrebert thank you! |
@rultor let's merge |
@rultor merge this |
@cvrebert once |
@rultor deploy pls |
Fixes #1090 by adding
Pull.base()
andPull.head()
getters, which return instances of the newPullRef
class, which allows structured access to the pull request branch+commit data. Thus, the user no longer has to resort to dealing with the raw JSON directly themselves.