Guard recursive update for undefined SQUASH_COMMIT #11
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: Optimized Recursive Update of PR Stack on Squash Merge | |
| on: | |
| pull_request: | |
| types: [closed, synchronize] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| repository-projects: read # See https://github.com/cli/cli/discussions/5307 | |
| jobs: | |
| update-pr-stack: | |
| if: github.event.action == 'closed' && github.event.pull_request.merged == true && github.event.pull_request.merge_commit_sha != '' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Update PR stack | |
| uses: ./ | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| continue-after-conflict-resolution: | |
| if: github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'autorestack-needs-conflict-resolution') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Continue PR stack update after conflict resolution | |
| uses: ./ | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| mode: conflict-resolved | |
| pr-branch: ${{ github.event.pull_request.head.ref }} |