Skip to content

Commit 549861f

Browse files
committed
IFU into develop should look for main branch upstream (#2779)
Fixes #ISSUE_NUMBER
1 parent 777e73c commit 549861f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/create_ifu_tag.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ jobs:
4040
HEAD_SHA="${{ github.event.pull_request.head.sha }}"
4141
MERGE_SHA="${{ github.event.pull_request.merge_commit_sha }}"
4242
43+
# For release branches, local branch is same as remote branch. But, for rocm/pytorch's
44+
# develop branch, we want to use main branch upstream
45+
if [ "$BASE_REF" == "develop" ]; then
46+
BASE_REF="main"
47+
fi
48+
49+
echo "PR_NUM=$PR_NUM"
50+
echo "BASE_REF=$BASE_REF"
51+
echo "HEAD_SHA=$HEAD_SHA"
52+
echo "MERGE_SHA=$MERGE_SHA"
53+
4354
# The ROCm base commit is the first parent of the merge commit that landed the PR
4455
# (i.e., the base branch tip BEFORE this PR merged).
4556
ROCM_BASE_SHA=$(git rev-parse "${MERGE_SHA}^1")
@@ -52,10 +63,6 @@ jobs:
5263
# between the PR head commit and upstream/main as fetched now.
5364
# This gives you the exact upstream commit (or the best common ancestor) that HEAD included.
5465
UPSTREAM_MAIN_SHA=$(git merge-base "${HEAD_SHA}" "upstream/$BASE_REF")
55-
echo "PR_NUM=$PR_NUM"
56-
echo "BASE_REF=$BASE_REF"
57-
echo "HEAD_SHA=$HEAD_SHA"
58-
echo "MERGE_SHA=$MERGE_SHA"
5966
echo "ROCM_BASE_SHA=$ROCM_BASE_SHA"
6067
echo "UPSTREAM_MAIN_SHA=$UPSTREAM_MAIN_SHA"
6168

0 commit comments

Comments
 (0)