"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/cmd/secret/set/http.go" between
gh-cli-1.11.0.tar.gz and gh-cli-1.12.0.tar.gz

About: GitHub CLI is GitHub’s official command line tool.

http.go  (gh-cli-1.11.0):http.go  (gh-cli-1.12.0)
skipping to change at line 58 skipping to change at line 58
func getOrgPublicKey(client *api.Client, host, orgName string) (*PubKey, error) { func getOrgPublicKey(client *api.Client, host, orgName string) (*PubKey, error) {
return getPubKey(client, host, fmt.Sprintf("orgs/%s/actions/secrets/publi c-key", orgName)) return getPubKey(client, host, fmt.Sprintf("orgs/%s/actions/secrets/publi c-key", orgName))
} }
func getRepoPubKey(client *api.Client, repo ghrepo.Interface) (*PubKey, error) { func getRepoPubKey(client *api.Client, repo ghrepo.Interface) (*PubKey, error) {
return getPubKey(client, repo.RepoHost(), fmt.Sprintf("repos/%s/actions/s ecrets/public-key", return getPubKey(client, repo.RepoHost(), fmt.Sprintf("repos/%s/actions/s ecrets/public-key",
ghrepo.FullName(repo))) ghrepo.FullName(repo)))
} }
func getEnvPubKey(client *api.Client, repo ghrepo.Interface, envName string) (*P
ubKey, error) {
return getPubKey(client, repo.RepoHost(), fmt.Sprintf("repos/%s/environme
nts/%s/secrets/public-key",
ghrepo.FullName(repo), envName))
}
func putSecret(client *api.Client, host, path string, payload SecretPayload) err or { func putSecret(client *api.Client, host, path string, payload SecretPayload) err or {
payloadBytes, err := json.Marshal(payload) payloadBytes, err := json.Marshal(payload)
if err != nil { if err != nil {
return fmt.Errorf("failed to serialize: %w", err) return fmt.Errorf("failed to serialize: %w", err)
} }
requestBody := bytes.NewReader(payloadBytes) requestBody := bytes.NewReader(payloadBytes)
return client.REST(host, "PUT", path, requestBody, nil) return client.REST(host, "PUT", path, requestBody, nil)
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)