MCPcopy Index your code
hub / github.com/google/go-github / CreateOrUpdateUserSecret

Method CreateOrUpdateUserSecret

github/codespaces_secrets.go:190–197  ·  view source on GitHub ↗

CreateOrUpdateUserSecret creates or updates a users codespace secret Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using LibSodium. You must authenticate using an access token with the codespace or codespace:secrets scope to use this endpoint. User

(ctx context.Context, eSecret *EncryptedSecret)

Source from the content-addressed store, hash-verified

188//
189//meta:operation PUT /user/codespaces/secrets/{secret_name}
190func (s *CodespacesService) CreateOrUpdateUserSecret(ctx context.Context, eSecret *EncryptedSecret) (*Response, error) {
191 if eSecret == nil {
192 return nil, errors.New("encrypted secret must be provided")
193 }
194
195 u := fmt.Sprintf("user/codespaces/secrets/%v", eSecret.Name)
196 return s.createOrUpdateSecret(ctx, u, eSecret)
197}
198
199// CreateOrUpdateOrgSecret creates or updates an orgs codespace secret
200//

Callers 2

addUserSecretFunction · 0.80

Calls 1

createOrUpdateSecretMethod · 0.95