FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Bugfix/action/get contents with decode parameter by userlocalhost · Pull Request #42 · StackStorm-Exchange/stackstorm-github · GitHub

Repository navigation

Bugfix/action/get contents with decode parameter - #42

Merged
nzlosh merged 8 commits into
StackStorm-Exchange:masterfrom
userlocalhost:bugfix/action/get_contents_with_decode_paramter
Jul 25, 2023
Merged

nzlosh merged 8 commits into
StackStorm-Exchange:masterfrom
userlocalhost:bugfix/action/get_contents_with_decode_paramter

Conversation

Copy link
Copy Markdown
Contributor

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

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.

blag commented Jul 17, 2021

Copy link
Copy Markdown
Contributor

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.

blag added the bug label Jul 17, 2021

Copy link
Copy Markdown
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.
userlocalhost force-pushed the bugfix/action/get_contents_with_decode_paramter branch from 230c323 to b335d47 Compare July 20, 2021 02:17
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)
userlocalhost force-pushed the bugfix/action/get_contents_with_decode_paramter branch from caa1432 to a43361e Compare July 21, 2021 02:44

CLAassistant commented May 11, 2022 •
edited
Loading

Copy link
Copy Markdown


All committers have signed the CLA.

arm4b commented Aug 18, 2022 •
edited
Loading

Copy link
Copy Markdown
Member

@userlocalhost is the change here still actual, can I merge it?
Sorry, my bad. I thought you had write access in this repo to merge it by yourself.

Copy link
Copy Markdown

@userlocalhost @armab Faced the same issue.

After pulling the fix, it works however

I wanted to follow up with ETA on the merge of this fix?

nzlosh merged commit 7a6e159 into StackStorm-Exchange:master Jul 25, 2023
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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The "github.get_contents" action will fail when decode parameter is set

6 participants


Back | FazBrowse Home | New Git URL