ci: bump ai-review-prompts pin to 3f2300a3 (week-of-06-01 calibration) #195
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: Assign Reviewers | |
| on: | |
| pull_request_target: | |
| types: [opened, ready_for_review] | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| assign: | |
| if: ${{ !github.event.pull_request.draft }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Assign default reviewers if none set | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| REVIEWERS_JSON: ${{ toJson(github.event.pull_request.requested_reviewers) }} | |
| TEAMS_JSON: ${{ toJson(github.event.pull_request.requested_teams) }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| REPO: ${{ github.repository }} | |
| PR_AUTHOR: ${{ github.event.pull_request.user.login }} | |
| run: | | |
| reviewers=$(echo "$REVIEWERS_JSON" | jq 'length') | |
| teams=$(echo "$TEAMS_JSON" | jq 'length') | |
| if [ "$reviewers" -eq 0 ] && [ "$teams" -eq 0 ]; then | |
| echo '["cb1kenobi","heskew","Ethan-Arrowood","kriszyp"]' \ | |
| | jq --arg author "$PR_AUTHOR" '{"reviewers": [.[] | select(. != $author)]}' \ | |
| | gh api "repos/$REPO/pulls/$PR_NUMBER/requested_reviewers" \ | |
| --method POST \ | |
| --input - | |
| fi |