MCPcopy Create free account
hub / github.com/cli/cli / patchEnvVariable

Function patchEnvVariable

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

Source from the content-addressed store, hash-verified

154}
155
156func patchEnvVariable(client *api.Client, host string, repoID int64, envName, variableName, value string) error {
157 payload := setPayload{
158 Value: value,
159 }
160 path, err := safeurl.JoinPath("repositories", strconv.FormatInt(repoID, 10), "environments", envName, "variables", variableName)
161 if err != nil {
162 return err
163 }
164 return patchVariable(client, host, path, payload)
165}
166
167func patchRepoVariable(client *api.Client, repo ghrepo.Interface, variableName, value string) error {
168 payload := setPayload{

Callers 1

setVariableFunction · 0.85

Calls 2

JoinPathFunction · 0.92
patchVariableFunction · 0.85

Tested by

no test coverage detected