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

Method CreateOrUpdateOrgSecret

github/codespaces_secrets.go:206–213  ·  view source on GitHub ↗

CreateOrUpdateOrgSecret creates or updates an orgs codespace secret Creates or updates an organization secret with an encrypted value. Encrypt your secret using LibSodium. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub API docs: https://docs.githu

(ctx context.Context, org string, eSecret *EncryptedSecret)

Source from the content-addressed store, hash-verified

204//
205//meta:operation PUT /orgs/{org}/codespaces/secrets/{secret_name}
206func (s *CodespacesService) CreateOrUpdateOrgSecret(ctx context.Context, org string, eSecret *EncryptedSecret) (*Response, error) {
207 if eSecret == nil {
208 return nil, errors.New("encrypted secret must be provided")
209 }
210
211 u := fmt.Sprintf("orgs/%v/codespaces/secrets/%v", org, eSecret.Name)
212 return s.createOrUpdateSecret(ctx, u, eSecret)
213}
214
215// CreateOrUpdateRepoSecret creates or updates a repos codespace secret
216//

Callers

nothing calls this directly

Calls 1

createOrUpdateSecretMethod · 0.95

Tested by

no test coverage detected