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

Ability to commit textContent directly to tree, without intermediate blobs #504

Closed
blacelle opened this issue Mar 12, 2019 · 7 comments
Closed

Comments

@blacelle
Copy link
Contributor

#360 introduces a way to commit multiple files in a single commit. The library API suggests it is possible to build a tree from text content without creating blob manually with org.kohsuke.github.GHTreeBuilder.textEntry(String, String, boolean).

However, this fails with:

{"message":"Must supply tree.sha or tree.content","documentation_url":"https://developer.github.com/v3/git/trees/#create-a-tree"}
@spaceghost69
Copy link

Sha seems required despite docs...?

@iHatebug
Copy link

I also tried this and hit the same issue, may i know if there's any work around to commit multiple files in a single commit?

@bitwiseman
Copy link
Member

bitwiseman commented Nov 19, 2019

#360 was committed before we added a framework that made adding tests easier.

@siordache
I know it has been a while but as the submitter of the original change would you be willing to add some tests we could use as examples?

@spaceghost69 @blacelle @iHatebug
Please help us in improve this project by submitting documentation, tests that show a how this currently behave or how it should behave. Fixes are also welcome.

@siordache
Copy link
Contributor

@bitwiseman I will look into it in the next few days.

siordache added a commit to siordache-forks/github-api that referenced this issue Nov 20, 2019
add new methods for creating tree content
bitwiseman added a commit that referenced this issue Nov 21, 2019
@bitwiseman
Copy link
Member

Fixed in #620

@siordache
Copy link
Contributor

@spaceghost69 @blacelle @iHatebug
Until the fix goes live, see this gist for a workaround.

@bitwiseman
Copy link
Member

Live now in v1.100. Thanks @siordache!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants