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

Function postOrgVariable

pkg/cmd/variable/set/http.go:96–108  ·  view source on GitHub ↗
(client *api.Client, host, orgName, visibility, variableName, value string, repositoryIDs []int64)

Source from the content-addressed store, hash-verified

94}
95
96func postOrgVariable(client *api.Client, host, orgName, visibility, variableName, value string, repositoryIDs []int64) error {
97 payload := setPayload{
98 Name: variableName,
99 Value: value,
100 Visibility: visibility,
101 Repositories: repositoryIDs,
102 }
103 path, err := safeurl.JoinPath("orgs", orgName, "actions", "variables")
104 if err != nil {
105 return err
106 }
107 return postVariable(client, host, path, payload)
108}
109
110func postEnvVariable(client *api.Client, host string, repoID int64, envName, variableName, value string) error {
111 payload := setPayload{

Callers 1

setVariableFunction · 0.85

Calls 2

JoinPathFunction · 0.92
postVariableFunction · 0.85

Tested by

no test coverage detected