Skip to content

Commit c0b52da

Browse files
ueshinHyukjinKwon
authored andcommitted
[SPARK-35388][INFRA] Allow the PR source branch to include slashes
### What changes were proposed in this pull request? This PR allows the PR source branch to include slashes. ### Why are the changes needed? There are PRs whose source branches include slashes, like `issues/SPARK-35119/gha` here or #32523. Before the fix, the PR build fails in `Sync the current branch with the latest in Apache Spark` phase. For example, at #32523, the source branch is `issues/SPARK-35382/nested_higher_order_functions`: ``` ... fatal: couldn't find remote ref nested_higher_order_functions Error: Process completed with exit code 128. ``` (https://github.com/ueshin/apache-spark/runs/2569356241) ### Does this PR introduce _any_ user-facing change? No, this is a dev-only change. ### How was this patch tested? This PR source branch includes slashes and #32525 doesn't. Closes #32524 from ueshin/issues/SPARK-35119/gha. Authored-by: Takuya UESHIN <ueshin@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
1 parent 3241aeb commit c0b52da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/build_and_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
id: sync-branch
9090
run: |
9191
apache_spark_ref=`git rev-parse HEAD`
92-
git fetch https://github.com/$GITHUB_REPOSITORY.git ${GITHUB_REF##*/}
92+
git fetch https://github.com/$GITHUB_REPOSITORY.git ${GITHUB_REF#refs/heads/}
9393
git -c user.name='Apache Spark Test Account' -c user.email='sparktestacc@gmail.com' merge --no-commit --progress --squash FETCH_HEAD
9494
git -c user.name='Apache Spark Test Account' -c user.email='sparktestacc@gmail.com' commit -m "Merged commit"
9595
echo "::set-output name=APACHE_SPARK_REF::$apache_spark_ref"
@@ -186,7 +186,7 @@ jobs:
186186
id: sync-branch
187187
run: |
188188
apache_spark_ref=`git rev-parse HEAD`
189-
git fetch https://github.com/$GITHUB_REPOSITORY.git ${GITHUB_REF##*/}
189+
git fetch https://github.com/$GITHUB_REPOSITORY.git ${GITHUB_REF#refs/heads/}
190190
git -c user.name='Apache Spark Test Account' -c user.email='sparktestacc@gmail.com' merge --no-commit --progress --squash FETCH_HEAD
191191
git -c user.name='Apache Spark Test Account' -c user.email='sparktestacc@gmail.com' commit -m "Merged commit"
192192
echo "::set-output name=APACHE_SPARK_REF::$apache_spark_ref"
@@ -262,7 +262,7 @@ jobs:
262262
id: sync-branch
263263
run: |
264264
apache_spark_ref=`git rev-parse HEAD`
265-
git fetch https://github.com/$GITHUB_REPOSITORY.git ${GITHUB_REF##*/}
265+
git fetch https://github.com/$GITHUB_REPOSITORY.git ${GITHUB_REF#refs/heads/}
266266
git -c user.name='Apache Spark Test Account' -c user.email='sparktestacc@gmail.com' merge --no-commit --progress --squash FETCH_HEAD
267267
git -c user.name='Apache Spark Test Account' -c user.email='sparktestacc@gmail.com' commit -m "Merged commit"
268268
echo "::set-output name=APACHE_SPARK_REF::$apache_spark_ref"

0 commit comments

Comments
 (0)