From ab97243ed03e7ac8460c9c1a25dcfdbe7cf730b5 Mon Sep 17 00:00:00 2001 From: John-Michael Faircloth Date: Thu, 29 Jun 2023 14:45:53 -0500 Subject: [PATCH] plugin automation: fix branch name (#21515) * plugin automation: fix branch name * fix input name --- .github/scripts/plugin-helper-gh-pr-create.sh | 17 +++++++++-------- .github/workflows/plugin-update-check.yml | 17 +++++++++++------ 2 files changed, 20 insertions(+), 14 deletions(-) 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