-
Notifications
You must be signed in to change notification settings - Fork 736
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
Post only non-null values in request body for createTree #642
Post only non-null values in request body for createTree #642
Conversation
@asthinasthi |
Actually I see that we have deprecated this https://github.com/github-api/github-api/blob/d1507f26668950508e0bf242c34cdb599003991a/src/main/java/org/kohsuke/github/GHTreeBuilder.java#L111 So when we use the recommended
We create a sha & then use it in the API. We never send a null sha field. Also, we have deprecated |
@asthinasthi |
We can close this. As long as I stay away from deprecated methods I should be fine. |
Can this be reopened and merged? I just got bit by this issue in deployed production code after a GH:E upgrade and it took me forever to track it down. |
@@ -16,8 +18,10 @@ | |||
|
|||
private final List<TreeEntry> treeEntries = new ArrayList<TreeEntry>(); | |||
|
|||
@JsonInclude(Include.NON_NULL) |
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.
@JsonInclude(Include.NON_NULL) | |
// Issue #636: Create Tree no longer accepts null value in sha field | |
@JsonInclude(Include.NON_NULL) |
Description
Github release 2.18+ doesn't accept
sha:null
in the request body. This change fixes that. More details here: #636Before submitting a PR:
We love getting PRs, but we hate asking people for the same basic changes every time.
master
. Create your PR from that branch.mvn install site
locally. This may reformat your code, commit those changes. If this command doesn't succeed, your change will not pass CI.