chore(scripts): auto authenticate gh CLI in scripts on dogfood (#13107)

* chore: auto authenticate gh CLI in scripts

* fix shellcheck issues
This commit is contained in:
Muhammad Atif Ali
2024-04-30 19:36:12 +03:00
committed by GitHub
parent 53f7e9e0a1
commit 3ff9cef498
6 changed files with 34 additions and 1 deletions
+6
View File
@@ -4,6 +4,9 @@
# [#pr-deployments](https://codercom.slack.com/archives/C05DNE982E8) Slack channel
set -euo pipefail
# shellcheck source=scripts/lib.sh
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
cdroot
# default settings
dryRun=false
@@ -64,6 +67,9 @@ if $confirm; then
fi
fi
# Authenticate gh CLI
gh_auth
# get branch name and pr number
branchName=$(gh pr view --json headRefName | jq -r .headRefName)
prNumber=$(gh pr view --json number | jq -r .number)