MCPcopy Index your code
hub / github.com/cli/cli / postEnvVariable

Function postEnvVariable

pkg/cmd/variable/set/http.go:105–112  ·  view source on GitHub ↗
(client *api.Client, host string, repoID int64, envName, variableName, value string)

Source from the content-addressed store, hash-verified

103}
104
105func postEnvVariable(client *api.Client, host string, repoID int64, envName, variableName, value string) error {
106 payload := setPayload{
107 Name: variableName,
108 Value: value,
109 }
110 path := fmt.Sprintf(`repositories/%d/environments/%s/variables`, repoID, envName)
111 return postVariable(client, host, path, payload)
112}
113
114func postRepoVariable(client *api.Client, repo ghrepo.Interface, variableName, value string) error {
115 payload := setPayload{

Callers 1

setVariableFunction · 0.85

Calls 1

postVariableFunction · 0.85

Tested by

no test coverage detected