Skip to content

EAR post-review

EAR post-review #74

Workflow file for this run

name: The EARs Reviewing bot on merged or closed PRs
on:
pull_request_target:
types: [closed]
jobs:
closed-pr:
if: contains(github.event.pull_request.labels.*.name, 'ERGA-BGE') || contains(github.event.pull_request.labels.*.name, 'ERGA-Pilot') || contains(github.event.pull_request.labels.*.name, 'ERGA-Community')
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 }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Remove reviewer from the busy reviewers and update the csv file
env:
GITHUB_APP_TOKEN: ${{ steps.generate-token.outputs.token }}
GITHUB_REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
SLACK_CHANNEL_ID: "C070UHJ80Q3"
run: |
python -m pip install --upgrade pip
python -m pip install -r ear_bot/requirements.txt
python -u ear_bot/ear_bot_reviewer.py --merge ${{ github.event.pull_request.merged }}
- name: Upload csv file
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: "rev/*.csv"
branch: main
- name: Upload yaml file
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: "*.yaml"
branch: main
disable_globbing: true