Skip to content

Commit f3cfe47

Browse files
authored
Fix the link to the downstream PR (#160)
1 parent 5f3c134 commit f3cfe47

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/rocm-open-upstream-pr.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
git fetch
2323
git checkout -b $NEW_BRANCH_NAME origin/${{ github.head_ref }}
2424
git rebase --onto origin/main origin/rocm-main
25-
git push origin HEAD
25+
# Force push here so that we don't run into conflicts with the origin branch
26+
git push origin HEAD --force
2627
- name: Leave link to create PR
2728
env:
2829
GH_TOKEN: ${{ github.token }}
@@ -31,7 +32,7 @@ jobs:
3132
NL=$'\n'
3233
# Encode the PR title and body for passing as URL get parameters
3334
TITLE_ENC=$(jq -rn --arg x "[ROCm] ${{ github.event.pull_request.title }}" '$x|@uri')
34-
BODY_ENC=$(jq -rn --arg x $"${{ github.event.pull_request.body }}${NL}${NL}Created from: ${{ github.event.pull_request.url }}" '$x|@uri')
35+
BODY_ENC=$(jq -rn --arg x $"${{ github.event.pull_request.body }}${NL}${NL}Created from: rocm/jax#${{ github.event.pull_request.number }}" '$x|@uri')
3536
# Create a link to the that will open up a new PR form to upstream and autofill the fields
3637
CREATE_PR_LINK="https://github.com/jax-ml/jax/compare/main...ROCm:jax:$NEW_BRANCH_NAME?expand=1&title=$TITLE_ENC&body=$BODY_ENC"
3738
# Add a comment with the link to the PR

0 commit comments

Comments
 (0)