Skip to content

Commit eb4f18e

Browse files
authored
chore: Update auto-update job (#1087)
1 parent 314603c commit eb4f18e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/autoupdate-pr.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ jobs:
2424

2525
- name: Auto update pull requests
2626
run: |
27-
PR_LIST=$(curl -s -H "Authorization: Bearer ${{ secrets.DISPATCH_ACCESS_TOKEN }}" "https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open" | jq -r '.[] | .head.ref')
27+
PR_LIST=$(curl -s -H "Authorization: Bearer ${{ secrets.DISPATCH_ACCESS_TOKEN }}" \
28+
"https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open&base=${{ github.ref_name }}" \
29+
| jq -r '.[] | select(.user.login=="box-sdk-build") | .head.ref')
30+
2831
for pr_branch in $PR_LIST; do
2932
git checkout "$pr_branch"
30-
if git merge origin/combined-sdk; then
33+
if git merge origin/${{ github.ref_name }}; then
3134
git push
3235
else
3336
# Conflict occurred, resolve by keeping our changes
@@ -36,4 +39,4 @@ jobs:
3639
git commit -m "Auto resolve conflict by keeping our changes"
3740
git push
3841
fi
39-
done
42+
done

0 commit comments

Comments
 (0)