diff --git a/.github/scripts/plugin-helper-gh-pr-create.sh b/.github/scripts/plugin-helper-gh-pr-create.sh index ec18035b0c..f32d8bdad3 100755 --- a/.github/scripts/plugin-helper-gh-pr-create.sh +++ b/.github/scripts/plugin-helper-gh-pr-create.sh @@ -2,15 +2,16 @@ # this script expects the following env vars to be set # - GITHUB_TOKEN -# - PLUGIN_REPO_NAME -# - BRANCH_NAME +# - PLUGIN_REPO +# - VAULT_BRANCH +# - PLUGIN_BRANCH # - RUN_ID # we are using the GH API directly so that we can get the resluting # PR URL from the JSON response reviewers="fairclothjm,kpcraig" -resp=$(curl -L \ +resp=$(curl -sL \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer ${GITHUB_TOKEN}"\ @@ -18,9 +19,9 @@ resp=$(curl -L \ https://api.github.com/repos/hashicorp/vault/pulls \ --data @<(cat < 0 env: GITHUB_TOKEN: ${{secrets.ELEVATED_GITHUB_TOKEN}} # Only open a PR if the branch is not attached to an existing one run: | - PR=$(gh pr list --head "$BRANCH_NAME" --json number -q '.[0].number') + PR=$(gh pr list --head "$VAULT_BRANCH" --json number -q '.[0].number') if [ -z "$PR" ]; then # call the script to create the plugin update PR on Vault