Send pending review notifications to reviewer on github-discussion #193
This file contains 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: Send pending review notifications to reviewer on github-discussion | |
on: | |
schedule: | |
# Every Tuesday and Thursday at 16:00 UTC. | |
- cron: '0 16 * * 2,4' | |
# GitHub doesn't provide assurance that the scheduled jobs will run on time | |
# (see https://github.community/t/no-assurance-on-scheduled-jobs/133753). | |
# So, we add the workflow_dispatch event here to allow triggering this | |
# workflow manually if needed. | |
workflow_dispatch: | |
jobs: | |
send_notifications: | |
name: Send pending review notifications | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8.15' | |
architecture: 'x64' | |
# SHA1 hash of the develop commit. | |
- name: Notify reviewers | |
uses: oppia/stale-review-request-notifier@9765c6aac4a37f69cdb2a4ad0078b722d2364b3d | |
with: | |
category-name: Notify\ Reviewers | |
discussion-title: Pending\ Reviews | |
repo-token: ${{ secrets.DISCUSSION_NOTIFICATION_TOKEN }} | |
review-turnaround-hours: 48 | |
- name: Report if failed | |
if: ${{ failure() }} | |
uses: ./.github/actions/send-webhook-notification | |
with: | |
message: "A pending-review-notification workflow failed." | |
webhook-url: ${{ secrets.BUILD_FAILURE_ROOM_WEBHOOK_URL }} |