Skip to content

Commit 7a6e483

Browse files
committed
chore: Update auto-update job
1 parent 0f0671f commit 7a6e483

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/autoupdate-pr.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Autoupdate PR
22
on:
33
push:
44
branches:
5+
- main
6+
- sdk-gen
57
- combined-sdk
68

79
jobs:
@@ -24,10 +26,13 @@ jobs:
2426

2527
- name: Auto update pull requests
2628
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')
29+
PR_LIST=$(curl -s -H "Authorization: Bearer ${{ secrets.DISPATCH_ACCESS_TOKEN }}" \
30+
"https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open&base=${{ github.ref_name }}" \
31+
| jq -r '.[] | select(.user.login=="box-sdk-build") | .head.ref')
32+
2833
for pr_branch in $PR_LIST; do
2934
git checkout "$pr_branch"
30-
if git merge origin/combined-sdk; then
35+
if git merge origin/${{ github.ref_name }}; then
3136
git push
3237
else
3338
# Conflict occurred, resolve by keeping our changes

0 commit comments

Comments
 (0)