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

Function patchVariable

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

Source from the content-addressed store, hash-verified

121}
122
123func patchVariable(client *api.Client, host, path string, payload interface{}) error {
124 payloadBytes, err := json.Marshal(payload)
125 if err != nil {
126 return fmt.Errorf("failed to serialize: %w", err)
127 }
128 requestBody := bytes.NewReader(payloadBytes)
129 return client.REST(host, "PATCH", path, requestBody, nil)
130}
131
132func patchOrgVariable(client *api.Client, host, orgName, visibility, variableName, value string, repositoryIDs []int64) error {
133 payload := setPayload{

Callers 3

patchOrgVariableFunction · 0.85
patchEnvVariableFunction · 0.85
patchRepoVariableFunction · 0.85

Calls 2

ErrorfMethod · 0.65
RESTMethod · 0.65

Tested by

no test coverage detected