Version Packages (beta) #1274
Workflow file for this run
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: Auto-merge Release PRs | |
| on: | |
| pull_request: | |
| types: [opened, reopened] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| enable-auto-merge: | |
| name: Enable Auto-merge for Release PRs | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| # Only run if PR is created by vercel-ai-sdk[bot] and branch starts with changeset-release/ | |
| if: | | |
| github.event.pull_request.user.login == 'vercel-ai-sdk[bot]' && | |
| startsWith(github.event.pull_request.head.ref, 'changeset-release/') | |
| steps: | |
| - name: merge pull request | |
| run: | | |
| gh pr merge ${{ github.event.pull_request.number }} --auto --squash | |
| gh pr review ${{ github.event.pull_request.number }} --approve | |
| env: | |
| # this should really be an app token. But for that we would need to register a secondary app, | |
| # since the vercel=ai-sdk app already creates the pull request and it cannot approve its own pull requests. | |
| GH_TOKEN: ${{ secrets.GR2M_PR_REVIEW_TOKEN }} | |
| GH_REPO: ${{ github.repository }} |