Skip to content

The EARs Reviewing bot for assigning reviewer after supervisor approval #242

The EARs Reviewing bot for assigning reviewer after supervisor approval

The EARs Reviewing bot for assigning reviewer after supervisor approval #242

name: The EARs Reviewing bot for assigning reviewer after supervisor approval
on:
schedule:
- cron: "0 9,21 * * *"
workflow_dispatch:
jobs:
find-reviewer:
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: 917566
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: "ERGA-consortium"
repositories: "EARs"
- name: Checkout
uses: actions/checkout@v4
with:
ref: "main"
token: ${{ steps.generate-token.outputs.token }}
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ear_bot/requirements.txt
- name: Run python script to find a reviewer
env:
GITHUB_APP_TOKEN: ${{ steps.generate-token.outputs.token }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: python -u ear_bot/ear_bot_reviewer.py --search