Skip to content

Conversation

@zoriya
Copy link
Contributor

@zoriya zoriya commented Sep 29, 2025

Fixes #2836


Before the change?

  • When creating a tree with a null content & sha, we got this error from github: Must supply either tree.sha or tree.content. Request will be rejected if both are present
  • Since null are not serialized, gh received neither a sha nor a content value in the tree and that caused the error.

After the change?

  • Actually serialize the null value of the sha to allow deletion of tree items.

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

I made an integration test but running it is a bit of a pain, I noticed there's no CI on my fork and i am opening this PR to get CI runs x)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@zoriya
Copy link
Contributor Author

zoriya commented Sep 29, 2025

Note that i also tested this in one of our project and i can confirm it works.

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

Labels

None yet

Projects

Status: 🆕 Triage

Development

Successfully merging this pull request may close these issues.

[BUG]: Creating a new tree with a null sha tree object fails

1 participant