GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Bugfix/action/get contents with decode parameter by userlocalhost · Pull Request #42 · StackStorm-Exchange/stackstorm-github

Conversation

@userlocalhost

@userlocalhost userlocalhost commented Jul 16, 2021

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
userlocalhost added 2 commits July 16, 2021 14:35
@userlocalhost
Fixed a bug that can't decode content at get_contents action
adcbfa4
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.
@userlocalhost
Update meta-info of this pack in association with the previous commit
2ce246c
@blag

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@blag blag added the bug label Jul 17, 2021
@userlocalhost

userlocalhost commented Jul 19, 2021

Copy link
Copy Markdown
Contributor Author

Thank you very much for your review. I got it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

userlocalhost added 3 commits July 19, 2021 10:22
@userlocalhost
Merge branch 'master' into bugfix/action/get_contents_with_decode_par…
5a8a92a
…amter
@userlocalhost
Fixed encoding processing problem in file creating and updating actions
9f81229
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
Fixed implementation to be compatible with PEP8
b335d47
@userlocalhost
userlocalhost force-pushed the bugfix/action/get_contents_with_decode_paramter branch from 230c323 to b335d47 Compare July 20, 2021 02:17
@userlocalhost
Fixed to return content, which is only str typed value.
a43361e
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
userlocalhost force-pushed the bugfix/action/get_contents_with_decode_paramter branch from caa1432 to a43361e Compare July 21, 2021 02:44
@userlocalhost
Resolved conflict with master
337c994
arm4b
arm4b approved these changes Mar 30, 2022
View reviewed changes
@CLAassistant

CLAassistant commented May 11, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nzlosh
nzlosh force-pushed the master branch from 77c0e5c to a1102c3 Compare July 13, 2022 09:07
@arm4b

arm4b commented Aug 18, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@RishabhDev42

RishabhDev42 commented Jul 25, 2023

Copy link
Copy Markdown

@userlocalhost @armab Faced the same issue.
image
After pulling the fix, it works however
image
I wanted to follow up with ETA on the merge of this fix?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nzlosh
Merge branch 'master' into bugfix/action/get_contents_with_decode_par…
07d7ce4
…amter
@nzlosh
nzlosh merged commit 7a6e159 into StackStorm-Exchange:master Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@arm4b arm4b arm4b approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@userlocalhost @blag @CLAassistant @arm4b @RishabhDev42 @nzlosh
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.