Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

First attempt at GitHub Secrets#184

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
TylerLeonhardt wants to merge2 commits intomicrosoft:master
base:master
Choose a base branch
Loading
fromTylerLeonhardt:added-github-secrets-support

Conversation

TylerLeonhardt
Copy link
Member

@TylerLeonhardtTylerLeonhardt commentedMay 27, 2020
edited
Loading

This adds the following cmdlets:

This does take a dependency on a module I created for this use-case: PSSodium
https://www.powershellgallery.com/packages/PSSodium/0.2.0

which just exposes a

ConvertTo-SodiumEncryptedString-Text<securestring>-PublicKey<string>

I'll get that in its own repo soon-ish. Done:https://github.com/TylerLeonhardt/PSSodium

Open questions

  • Some operations depend on others... so the output looks silly and this text appears multiple times...
Telemetry is currently enabled.  It can be disabled by calling "Set-GitHubConfiguration -DisableTelemetry". Refer to USAGE.md#telemetry for more information. Stop seeing this message in the future by calling "Set-GitHubConfiguration -SuppressTelemetryReminder".                                                                                             Telemetry is currently enabled.  It can be disabled by calling "Set-GitHubConfiguration -DisableTelemetry". Refer to USAGE.md#telemetry for more information. Stop seeing this message in the future by calling "Set-GitHubConfiguration -SuppressTelemetryReminder".                                                                                             Telemetry is currently enabled.  It can be disabled by calling "Set-GitHubConfiguration -DisableTelemetry". Refer to USAGE.md#telemetry for more information. Stop seeing this message in the future by calling "Set-GitHubConfiguration -SuppressTelemetryReminder".

any way I can avoid that?

  • How can I test this? Ideallyin GitHub Actions in a full E2E way but I'll need your help enabling that

@TylerLeonhardt
Copy link
MemberAuthor

cc@HowardWolosky

@TylerLeonhardt
Copy link
MemberAuthor

I considered adding support for the Org-level secrets but put that on hold for now:
https://developer.github.com/v3/actions/secrets/#list-organization-secrets

@HowardWoloskyHowardWolosky added api-actions-secretsWork to complete the API's defined here: https://developer.github.com/v3/actions/secrets enhancementAn issue or pull request introducing new functionality to the project. labelsJun 2, 2020
@HowardWoloskyHowardWolosky added api completenessThis is basic API functionality that hasn't been implemented yet. under consideration and removed enhancementAn issue or pull request introducing new functionality to the project. labelsJun 18, 2020
@TylerLeonhardt
Copy link
MemberAuthor

TylerLeonhardt commentedJul 20, 2020
edited
Loading

So, something I was thinking about... since PowerShellForGitHub exposesInvoke-GHRestMethod andInvoke-GHRestMethodMultipleResult I was thinking about refactoring this PR to only include:

Then I'll make my own module calledCreateGitHubSecrets or something that depends onPSSodium andPowerShellForGitHub that will implement:

@HowardWolosky
Copy link
Contributor

I think that would totally unblock this in the short term, and provides an easy path towards movingNew/Set back into here at some point in the future (since they would have already been built on-top ofInvoke-GHRestMethod) should it become more clear that taking on external dependencies makes sense.

TylerLeonhardt reacted with thumbs up emoji

@TylerLeonhardtTylerLeonhardtforce-pushed theadded-github-secrets-support branch from77d5805 tofdf6477CompareJuly 21, 2020 05:12
@TylerLeonhardt
Copy link
MemberAuthor

Alright I removed those but to write tests I need you to add a couple test secrets to either one of the test repos or to this repo. Let me know when you do that - I can't get the value so set that to whatever. The name can be whatever you want but share those here for me.

@HowardWolosky
Copy link
Contributor

Would an organization secret work? A secret stored in this repository won't help, because the accounts that are used while running CI don't have access to this repo. And there currently is no repo that is guaranteed to exist in any of the test accounts...but theorganization is guaranteed to be available, so I could add a secret to the test organizations.

If you do this though, you should add a comment to the tests (and to the CONTRIBUTING.md documentation in the tests section) to indicate that there is the expectation for those secrets to exist in the test organization in order for those tests to succeed...

@TylerLeonhardt
Copy link
MemberAuthor

No I don't think org secrets will work. That's a separate API and should be tested in and of itself.

@JustinGrote
Copy link

@HowardWolosky if this gets completed and merged I would happily contribute a Powershell SecretManagement Provider that would leverage this API to easily fetch repository secrets.
https://github.com/powershell/secretmanagement

@TylerLeonhardt
Copy link
MemberAuthor

@JustinGrote the problem is that there's no way to retrieve the value of secrets. You can set them and list meta data about them, but you can't get them.

JustinGrote reacted with thumbs up emoji

@sean-r-williams
Copy link

FWIW, my org just ran into this this week. We have a use case where we may be provisioning repo-level secrets in bulk from an external source - being able to callNew-GitHubSecret or similar across multiple repos would be a huge help.

(Org level secrets aren't applicable, since we have different secrets per team - the current PoR involves replicating the same team-scoped secret across many repos, which doesn't feel great.)

Not sure if this is still on the roadmap for the module (seems like there hasn't been commits in a couple of years), but it'd be great to get a temperature-check on iteration in this area.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
api completenessThis is basic API functionality that hasn't been implemented yet.api-actions-secretsWork to complete the API's defined here: https://developer.github.com/v3/actions/secretsunder consideration
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@TylerLeonhardt@HowardWolosky@JustinGrote@sean-r-williams

[8]ページ先頭

©2009-2025 Movatter.jp