(client *api.Client, host string, path safeurl.SafeURL, payload interface{})
| 132 | } |
| 133 | |
| 134 | func 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 | |
| 143 | func patchOrgVariable(client *api.Client, host, orgName, visibility, variableName, value string, repositoryIDs []int64) error { |
| 144 | payload := setPayload{ |
no test coverage detected