Skip to content

Commit 36ad275

Browse files
committed
Modify preview deployment script to work with forks by specifying the coder/coder repo
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 3e121e0 commit 36ad275

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/deploy-pr.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ fi
7171
gh_auth
7272

7373
# get branch name and pr number
74-
branchName=$(gh pr view --json headRefName | jq -r .headRefName)
75-
prNumber=$(gh pr view --json number | jq -r .number)
74+
info=$(gh pr status --repo=coder/coder --json headRefName,number --jq '.createdBy[0]')
75+
branchName=$(echo "${info}" | jq -r .headRefName)
76+
prNumber=$(echo "${info}" | jq -r .number)
7677

7778
if [[ "$dryRun" = true ]]; then
7879
echo "dry run"

0 commit comments

Comments
 (0)