Skip to content

Commit 77461b2

Browse files
authored
chore: Update auto-update job (#1473)
1 parent 0f0671f commit 77461b2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/autoupdate-pr.yml

Lines changed: 5 additions & 2 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

0 commit comments

Comments
 (0)