Mass comment #1
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: Mass comment | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| message: | |
| description: "Comment to post on all open PRs" | |
| required: true | |
| jobs: | |
| comment: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Comment on all open PRs | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh pr list --state open --limit 1000 --json number --jq '.[].number' | \ | |
| jq '.[]' | \ | |
| while read num; do | |
| gh pr comment "$num" --body "${{ github.event.inputs.message }}" | |
| done |