(client *api.Client, host, path string, payload interface{})
| 83 | } |
| 84 | |
| 85 | func 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 | |
| 94 | func postOrgVariable(client *api.Client, host, orgName, visibility, variableName, value string, repositoryIDs []int64) error { |
| 95 | payload := setPayload{ |
no test coverage detected