Skip to content

Replace "mature" with "sensitive" in api help strings #496

Replace "mature" with "sensitive" in api help strings

Replace "mature" with "sensitive" in api help strings #496

name: PR Limit Reminders
on:
pull_request_target:
types: [opened, reopened, ready_for_review]
jobs:
analyze-user-prs:
name: Count user's open pull requests
runs-on: ubuntu-latest
outputs:
pr_count: ${{ steps.count-prs.outputs.pr_count }}
slack_id: ${{ steps.count-prs.outputs.slack_id }}
steps:
- uses: actions/checkout@v3
- uses: actions/github-script@v6
id: count-prs
env:
GH_SLACK_USERNAME_MAP: ${{ secrets.GH_SLACK_USERNAME_MAP }}
with:
github-token: ${{ secrets.ACCESS_TOKEN }}
script: |
const script = require('./automations/js/src/count_user_reviewable_prs.js')
await script({github,context,core})
send_message:
needs: analyze-user-prs
name: Send Slack message
if: ${{ needs.analyze-user-prs.outputs.pr_count >= 3 }}
runs-on: ubuntu-latest
env:
slack_url: ${{ secrets.SLACK_DM_WEBHOOK_URL }}
pr_count: ${{ needs.analyze-user-prs.outputs.pr_count }}
slack_id: ${{ needs.analyze-user-prs.outputs.slack_id }}
steps:
- name: Send notification
run: |
msg="Hi, Opener! \nYou currently have $pr_count Pull Request(s) open with requested reviews (totalling $((pr_count * 2)) required reviews). \nTo help ease the review burden, increase review velocity for older PRs, and improve the equitable distribution of project maintenance tasks across the team, please consider reviewing this list of ways to contribute instead of working on new code contributions: \nhttps://docs.openverse.org/meta/maintainer_tasks.html"
curl \
"$slack_url" \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"user": "'"$slack_id"'",
"message": "'"$msg"'"
}'