Bugfix/action/get contents with decode parameter#42
Merged
nzlosh merged 8 commits intoJul 25, 2023
Merged
Conversation
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.
Contributor
|
This looks good. Please rebase this on the current It would be nice if we fixed the |
Contributor
Author
|
Thank you very much for your review. I got it. |
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.
230c323 to
b335d47
Compare
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)
caa1432 to
a43361e
Compare
arm4b
approved these changes
Mar 30, 2022
Member
|
@userlocalhost is the change here still actual, can I merge it? |
|
@userlocalhost @armab Faced the same issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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