mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user