Staging #17
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-Retarget PRs | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: [opened] | |
| jobs: | |
| retarget: | |
| # Skip if the PR is already coming from staging (that's our valid release path) | |
| if: github.head_ref != 'staging' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| steps: | |
| - name: Change PR base to staging | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.pulls.update({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.payload.pull_request.number, | |
| base: 'staging' | |
| }); |