chore: add avm-res-migrate metadata (#318) #81
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: housekeeping - PR Cleanup | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| cleanup: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| steps: | |
| - name: Clean up unmerged PRs that used to target PR head branch but now target main | |
| run: | | |
| PULL_REQUESTS=$(gh pr list --repo ${{ github.repository }} --base main --search "test: update mock module" --json number) | |
| echo "$PULL_REQUESTS" | jq -r '.[] | .number' | xargs -I% gh pr close --repo ${{ github.repository }} % --delete-branch --comment "Unmerged updates to mock modules closed as source PR is now merged." | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |