Skip to content

Update Contribs & reviewers #546

Update Contribs & reviewers

Update Contribs & reviewers #546

name: Update Contribs & reviewers
on:
workflow_dispatch:
schedule:
# Runs weekly on Monday at 03:21 UTC (see https://crontab.guru)
- cron: "21 3 * * 1"
jobs:
run-meta:
if: github.repository_owner == 'pyopensci'
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v5
with:
python-version: "3.12"
- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python -m pip install --upgrade pip wheel
- name: Install pyosmeta and run update contribs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install pyosmeta
update-contributors
update-reviews
update-review-teams
mkdir -p data
- name: Update editorial board
env:
# Using a fine grained token here that only has team read access.
GITHUB_TOKEN_TEAMS: ${{ secrets.PYOS_READ_TEAM_MEMBERS_SECRET }}
run: |
update-editorial-board
- name: Create Pull Request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
add-paths: |
data/contributors.yml
data/packages.yml
data/editorial-board.yml
data/emeritus-editors.yml
author: Leah <leah@pyopensci.org>
base: main
branch: contribs
commit-message: "Update: Contributor & review file update"
delete-branch: true
title: Update contributor and review data
labels: |
pre-commit.ci autofix
env:
# Custom token needed to trigger PR checks, as GITHUB_TOKEN won't
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
GITHUB_TOKEN: ${{ secrets.PYOS_PR_TOKEN }}
- name: Slack Notification
uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 #v2.4.0
if: failure()
env:
SLACK_CHANNEL: pyos-maintainers-infrastructure
SLACK_COLOR: '#db540b'
SLACK_LINK_NAMES: true
SLACKIFY_MARKDOWN: true
SLACK_TITLE: "Update Contribs & Reviewers Workflow Failed"
SLACK_MESSAGE: "The **Update Contribs & Reviewers** workflow failed for pyopensci.org. Please check the logs."
SLACK_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}