Skip to content

liujinye-sys's add reviewers job #1

liujinye-sys's add reviewers job

liujinye-sys's add reviewers job #1

Workflow file for this run

name: Add reviewers Job
run-name: ${{ github.actor }}'s add reviewers job
on:
pull_request:
types: [opened, reopened]
# reusable
workflow_call:
jobs:
onOpenedPullRequest:
runs-on: ubuntu-latest
steps:
- name: Get Reviewers
id: get_reviewers
run: |
REPO_NAME="$(basename ${{ github.repository }})"
wget https://raw.githubusercontent.com/liujinye-sys/public-actions/refs/heads/trunk/properties/codereviewers.github.json
REVIEWERS=$(jq -c -r '.'${REPO_NAME}'|map(select(.!="${{ github.actor }}"))' codereviewers.github.json|jq -r '.[]'|tr '\n' ','|sed 's/,$//g')
echo "REVIEWERS=${REVIEWERS}"|tee $GITHUB_ENV
- name: Add Pull Request Reviewers
uses: sakhnovict/[email protected]
with:
reviewers: ${{ env.REVIEWERS }}
token: ${{ secrets.GITHUB_TOKEN }}