Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Set-GitHubContent Encode Issues #328

Merged
merged 1 commit into from
May 11, 2021
Merged

Fix Set-GitHubContent Encode Issues #328

merged 1 commit into from
May 11, 2021

Conversation

jing8956
Copy link
Contributor

@jing8956 jing8956 commented May 5, 2021

Description

The UTF-16 LE encode let my text content many "�“
Is not github view a text file default encoding。

Issues Fixed

References

Checklist

  • You actually ran the code that you just wrote, especially if you did just "one last quick change".
  • Comment-based help added/updated, including examples.
  • Static analysis is reporting back clean.
  • New/changed code adheres to our coding guidelines.
  • Formatters were created for any new types being added.
  • New/changed code continues to support the pipeline.
  • Changes to the manifest file follow the manifest guidance.
  • Unit tests were added/updated and are all passing. See testing guidelines. This includes making sure that all pipeline input variations have been covered.
  • Relevant usage examples have been added/updated in USAGE.md.
  • If desired, ensure your name is added to our Contributors list

Copy link
Member

@HowardWolosky HowardWolosky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Get-GitHubContent already uses [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String()) when retrieving the content. Not sure why we weren't using UTF8 when setting it.

Thanks for the fix!

@HowardWolosky
Copy link
Member

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HowardWolosky HowardWolosky merged commit 1200b5b into microsoft:master May 11, 2021
@HowardWolosky HowardWolosky added api-contents Work to complete the API's defined here: https://developer.github.com/v3/repos/contents bug This relates to a bug in the existing module. labels May 11, 2021
@jorioux
Copy link

jorioux commented May 14, 2021

When are you planning to release a new version of the module with this fix?

@HowardWolosky
Copy link
Member

When are you planning to release a new version of the module with this fix?

Most likely this weekend.

@jing8956 jing8956 deleted the patch-1 branch May 17, 2021 09:00
@jorioux
Copy link

jorioux commented May 25, 2021

Still not released in the PSGallery, do you have an ETA?

@HowardWolosky
Copy link
Member

Still not released in the PSGallery, do you have an ETA?

Not a good one at the moment. The work on the repo side was done this morning for rev'ing the module, however the module also needs to be signed before it can be published to PSGallery. Unfortunately, the necessary steps for getting the module signed have changed within Microsoft since the last time a module update was published, and the new process has gotten quite a bit more complicated. Current (optimistic) ETA at this point to get this project transitioned to the new signing process is likely 2-3 weeks.

@jorioux
Copy link

jorioux commented Jul 9, 2021

@HowardWolosky with all due respect, it's been more than a month now, what is going on? Not having 0.16.1 in the PSGallery is a blocker for my team at "Intact Financial Corporation", we are planning on using this module extensively.

@HowardWolosky
Copy link
Member

HowardWolosky commented Jul 10, 2021

Hi @jorioux,

I'm excited to hear that your company is planning on using this module extensively, and I do apologize that you've been waiting so long for 0.16.1 to be published to PSGallery.

As I mentioned previously, the process used internally to get code/files signed with a Microsoft certificate that we ship externally to customers changed in April (which I didn't realize until I attempted to get the new module signed at the end of May), and I've been working towards getting this project migrated to that new process. This is the first time that the process has changed in many, many years. Without going into unnecessary internal details, I was overly optimistic in that estimate as I've encountered some issues that I continue to work on within the company. I'm continuing to work through the process internally and when there is a new estimate that I can provide, I will respond here with it.

Is there a specific company policy preventing you from using the code as-is within the repo as opposed to the published module as a workaround for the interim?

@HowardWolosky
Copy link
Member

Just as a general update here, I continue to be blocked internally by the necessary procedures to be able to get the module signed and updated to PowerShellGallery. I am working with the necessary parties to get things unblocked, but it's continuing to take much more time than anyone had originally anticipated due to the new process that was created.

@samsmithnz
Copy link

@HowardWolosky Any updates on a 0.16.1 release? This is affecting a big customer of mine/ours.

@HowardWolosky
Copy link
Member

@HowardWolosky Any updates on a 0.16.1 release? This is affecting a big customer of mine/ours.

@samsmithnz - Unfortunately, not yet. The internal changes around how to sign projects have created significant complications for getting these releases signed. I'm still engaging with the appropriate teams internally to get unblocked, but the progress here continues to be much slower than desired.

@HowardWolosky
Copy link
Member

0.16.1 has been successfully signed and published to PowerShellGallery. This proves out the new approach I need to use to sign releases moving forward. It's now a manual approach (can't use an Azure Pipeline anymore), but it at least gets things unblocked for the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-contents Work to complete the API's defined here: https://developer.github.com/v3/repos/contents bug This relates to a bug in the existing module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants