fix: sets the method to POST in reRunWorkflow fetch request.

This was not set and defaulted to a GET, causing the request to
fail.

Signed-off-by: Ciprianna Engel <ciprianna.engel@wpengine.com>
This commit is contained in:
Ciprianna Engel
2023-01-12 10:26:46 -06:00
parent a4eb191168
commit 1188407632
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-cloudbuild': patch
---
Fixed bug in the CloudbuildClient reRunWorkflow fetch call. The method in the fetch request was not specified and defaulted to a GET. Method is now explicitly set to POST with this change.
@@ -34,6 +34,7 @@ export class CloudbuildClient implements CloudbuildApi {
options.projectId,
)}/builds/${encodeURIComponent(options.runId)}:retry`,
{
method: 'POST',
headers: new Headers({
Accept: '*/*',
Authorization: `Bearer ${await this.getToken()}`,