Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/autoupdate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ jobs:

- name: Auto update pull requests
run: |
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')
PR_LIST=$(curl -s -H "Authorization: Bearer ${{ secrets.DISPATCH_ACCESS_TOKEN }}" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open&base=${{ github.ref_name }}" \
| jq -r '.[] | select(.user.login=="box-sdk-build") | .head.ref')

for pr_branch in $PR_LIST; do
git checkout "$pr_branch"
if git merge origin/combined-sdk; then
if git merge origin/${{ github.ref_name }}; then
git push
else
# Conflict occurred, resolve by keeping our changes
Expand All @@ -36,4 +39,4 @@ jobs:
git commit -m "Auto resolve conflict by keeping our changes"
git push
fi
done
done