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

Function postEnvVariable

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

Source from the content-addressed store, hash-verified

108}
109
110func postEnvVariable(client *api.Client, host string, repoID int64, envName, variableName, value string) error {
111 payload := setPayload{
112 Name: variableName,
113 Value: value,
114 }
115 path, err := safeurl.JoinPath("repositories", strconv.FormatInt(repoID, 10), "environments", envName, "variables")
116 if err != nil {
117 return err
118 }
119 return postVariable(client, host, path, payload)
120}
121
122func postRepoVariable(client *api.Client, repo ghrepo.Interface, variableName, value string) error {
123 payload := setPayload{

Callers 1

setVariableFunction · 0.85

Calls 2

JoinPathFunction · 0.92
postVariableFunction · 0.85

Tested by

no test coverage detected