Files
supabase/.github/workflows/dashboard-pr-reminder.yml
Ali WaseemandCharis 23c7c8c63e Fix: updated action to include state (#40385)
* updated action to include state

* removed CI status

* Update .github/workflows/dashboard-pr-reminder.yml

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-11-12 16:01:41 +00:00

47 lines
1.6 KiB
YAML

name: Dashboard PR Reminder
on:
schedule:
# Run at 10am Singapore Time (2am UTC)
- cron: '0 2 * * *'
# Run at 10am US Eastern Time (2pm UTC = 10am EDT / 9am EST)
- cron: '0 14 * * *'
workflow_dispatch: # Allow manual trigger for testing
permissions:
pull-requests: read
contents: read
jobs:
check-dashboard-prs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Find Dashboard PRs older than 24 hours
id: find-prs
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
with:
script: |
const findStalePRs = require('./scripts/actions/find-stale-dashboard-prs.js');
return await findStalePRs({ github, context, core });
- name: Send Slack notification
if: fromJSON(steps.find-prs.outputs.count) > 0
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DASHBOARD_WEBHOOK_URL }}
STALE_PRS_JSON: ${{ steps.find-prs.outputs.stale_prs }}
with:
script: |
const sendSlackNotification = require('./scripts/actions/send-slack-pr-notification.js');
const stalePRs = JSON.parse(process.env.STALE_PRS_JSON);
const webhookUrl = process.env.SLACK_WEBHOOK_URL;
await sendSlackNotification(stalePRs, webhookUrl);
- name: No stale PRs found
if: fromJSON(steps.find-prs.outputs.count) == 0
run: |
echo "✓ No Dashboard PRs older than 24 hours found"