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