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

Function patchVariable

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

Source from the content-addressed store, hash-verified

132}
133
134func patchVariable(client *api.Client, host string, path safeurl.SafeURL, payload interface{}) error {
135 payloadBytes, err := json.Marshal(payload)
136 if err != nil {
137 return fmt.Errorf("failed to serialize: %w", err)
138 }
139 requestBody := bytes.NewReader(payloadBytes)
140 return client.REST(host, "PATCH", path.String(), requestBody, nil)
141}
142
143func patchOrgVariable(client *api.Client, host, orgName, visibility, variableName, value string, repositoryIDs []int64) error {
144 payload := setPayload{

Callers 3

patchOrgVariableFunction · 0.85
patchEnvVariableFunction · 0.85
patchRepoVariableFunction · 0.85

Calls 3

ErrorfMethod · 0.65
RESTMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected