From 6bab888230f807cdd361c33d3d3023b9a1f3b718 Mon Sep 17 00:00:00 2001 From: hnrkndrssn Date: Fri, 30 Sep 2022 14:50:38 +1000 Subject: [PATCH] fix: Fix issue when creating PR to update homebrew formula --- .octopus/deployment_process.ocl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.octopus/deployment_process.ocl b/.octopus/deployment_process.ocl index 1c1080e8..1dcc370f 100644 --- a/.octopus/deployment_process.ocl +++ b/.octopus/deployment_process.ocl @@ -108,10 +108,20 @@ step "create-pull-request-to-update-formula-in-homebrew" { if ($githubtoken) { $baseBranch = $(git symbolic-ref "refs/remotes/origin/HEAD") -replace "refs/remotes/origin/", "" + $body = @{ + title = "octopus-cli $packageVersion" + body = "automatically generated" + head = $branchName + base = $baseBranch + } | ConvertTo-Json + + $body + Invoke-RestMethod -Method POST ` -Headers @{"Accept" = "application/vnd.github+json";"Authorization" = "Bearer $githubtoken"} ` -Uri https://api.github.com/repos/OctopusDeploy/homebrew-taps/pulls ` - -Body @{title = "octopus-cli $packageVersion";body = "automatically generated";head = $branchName;base = $baseBranch} + -ContentType "application/json" ` + -Body "$body" } cd ..