Skip to content

Create a tree with one of the blobs is "base64" encoded? #1293

@zhuzeng

Description

@zhuzeng

It seems go-github supports creating a blob and specifying its encoding to be "base64", but if I choose to use TreeEntry to create a tree, there is no way I can specify if this TreeEntry's encoding type - https://developer.github.com/v3/git/trees/#create-a-tree. Is there a way that when adding a "blob" type TreeEntry I can also specify that the content of this blob is base64 encoded? Thanks!

And to add a bit context to why I run into this issue, I was trying to create a commit which contains ".jar" files, and found out that reading the .jar files into bytes (using ioutiles.Readfile()) and then convert to string and put it into a TreeEntry - this actually messes up the .jar files content when it gets uploaded to my github repo (maybe I am doing something apparently wrong?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions