feat(boxsdkgen): treat nullable fields as Optional (box/box-codegen…
#105
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Autoupdate PR | |
| on: | |
| push: | |
| branches: | |
| - combined-sdk | |
| # We are not using github token for this workflow so best practice is to limit permissions | |
| permissions: {} | |
| jobs: | |
| update_pull_requests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.DISPATCH_ACCESS_TOKEN }} | |
| - name: Set up Git | |
| run: | | |
| git config --global user.name 'box-sdk-build' | |
| git config --global user.email '[email protected]' | |
| - name: Fetch all branches and tags | |
| run: git fetch --prune --unshallow | |
| - 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&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/${{ github.ref_name }}; then | |
| git push | |
| else | |
| # Conflict occurred, resolve by keeping our changes | |
| git checkout --ours . | |
| git add . | |
| git commit -m "Auto resolve conflict by keeping our changes" | |
| git push | |
| fi | |
| done |