| 206 | } |
| 207 | |
| 208 | func deleteRelease(httpClient *http.Client, host string, releaseURL safeurl.SafeURL) error { |
| 209 | // TODO(api-client-rollout) |
| 210 | // This line of code is part of a mechanical roll out of the api client. |
| 211 | // As a follow up, consider whether the api client can be injected to this call site, rather than constructed |
| 212 | return api.NewClientFromHTTP(httpClient).REST(host, http.MethodDelete, releaseURL.String(), nil, nil) |
| 213 | } |
| 214 | |
| 215 | // tokenHasWorkflowScope checks if the response token has the workflow scope. |
| 216 | // Tokens that do not have OAuth scopes are assumed to have the workflow scope. |