testing #3
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: Main Reviewer Checklist | |
| on: | |
| pull_request: | |
| types: [assigned] | |
| jobs: | |
| checklist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Extract the main reviewer (assignee) and PR details | |
| - name: Extract PR details | |
| id: pr_details | |
| run: | | |
| echo "ASSIGNEE=$(jq -r '.assignee.login' < $GITHUB_EVENT_PATH)" >> $GITHUB_ENV | |
| # Step 2: Replace the placeholder in the checklist template | |
| - name: Replace reviewer name in checklist template | |
| run: | | |
| ASSIGNEE=${{ env.ASSIGNEE }} | |
| sed "s/__MAINREV__/$ASSIGNEE/g" .github/workflows/main_rev_checklist.md > filled_checklist.md | |
| # Step 3: Post the filled checklist as a comment on the PR | |
| - name: Post checklist as a comment | |
| uses: peter-evans/create-or-update-comment@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| $(cat filled_checklist.md) |