| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This commit changed decoding processing of getting content to use ContentFile.decoded_content method instead of self-implemented one. Because the PyGithub, which this pack depends on, have already implemented decoding processing for content of ContentFile.
|
This looks good. Please rebase this on the current master (sorry I updated after you opened your PR). It would be nice if we fixed the decode_base64 as well, or removed it and every usage of it. |
Sorry, something went wrong.
|
Thank you very much for your review. I got it. |
Sorry, something went wrong.
In the previous implementation uses custom decoding method of `lib.formatters.base64_decode` when `github.create_file` and `github.update_file` actions are called with "encoding" parameter. And those will be failed because of its implementation. This removes `lib.formatters.base64_decode` method because it is not used any more except for above actions, which is wrong the way of using.
It's necessary for decode processing for the value that is get from `github.ContentFile.ContentFile.decoded_content` because it returns bytes typed value. This commit added its processing at `lib.formatters.contents_to_dict` method. (c.f. https://pygithub.readthedocs.io/en/latest/github_objects/ContentFile.html)
Sorry, something went wrong.
|
@userlocalhost is the change here still actual, can I merge it? |
Sorry, something went wrong.
|
@userlocalhost @armab Faced the same issue. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Close: #41
This commit changed decoding processing of getting content to use ContentFile.decoded_content method instead of self-implemented one.
Because the PyGithub, which this pack depends on, have already implemented decoding processing for content of ContentFile as below.
https://github.com/PyGithub/PyGithub/blob/v1.45/github/ContentFile.py#L58-L61