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

Function postVariable

pkg/cmd/variable/set/http.go:85–92  ·  view source on GitHub ↗
(client *api.Client, host, path string, payload interface{})

Source from the content-addressed store, hash-verified

83}
84
85func postVariable(client *api.Client, host, path string, payload interface{}) error {
86 payloadBytes, err := json.Marshal(payload)
87 if err != nil {
88 return fmt.Errorf("failed to serialize: %w", err)
89 }
90 requestBody := bytes.NewReader(payloadBytes)
91 return client.REST(host, "POST", path, requestBody, nil)
92}
93
94func postOrgVariable(client *api.Client, host, orgName, visibility, variableName, value string, repositoryIDs []int64) error {
95 payload := setPayload{

Callers 3

postOrgVariableFunction · 0.85
postEnvVariableFunction · 0.85
postRepoVariableFunction · 0.85

Calls 2

ErrorfMethod · 0.65
RESTMethod · 0.65

Tested by

no test coverage detected