Skip to content

Report on open PRs #1071

Report on open PRs

Report on open PRs #1071

name: "Report on open PRs"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
curl:
runs-on: ubuntu-latest
steps:
- name: Report number of open PRs to Uptime Kuma
run: |
pr_count=$(curl -s https://api.github.com/repos/dvdl16/github2todoist/pulls | jq length)
acceptable="3"
status="false"
msg="More%20than%203%20PRs%20are%20open"
if (( $(echo "$pr_count < $acceptable" | bc -l) )); then
status="true"
msg="OK"
fi
curl -X POST -H "Authorization: Bearer ${{ secrets.UPTIME_TOKEN }}" "${{ secrets.UPTIME_KUMA_URL }}?success=$status&error=$msg&duration=${pr_count}ms"