# CI CRON job that sends an issue digest to Slack. # Adapted from next.js implementation: https://github.com/vercel/next.js/blob/canary/.github/workflows/ # The workflow uses GitHub Actions' built-in `github.token` for `GITHUB_TOKEN` and requires `issues: read` permission. # Optional configuration: # `ISSUE_DIGEST_REPO` e.g. `vercel/workflow` # `DIGEST_INTERVAL_DAYS` e.g. `7` name: Issue Digest on: workflow_dispatch: schedule: # Weekly on Thursday at 12:00 UTC - cron: "0 12 * * 4" concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: false jobs: issue-digest: name: Post issue digest to Slack runs-on: ubuntu-latest permissions: contents: read issues: read steps: - name: Checkout Repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup Node.js 24.x uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 24.x - name: Post digest env: # Provided automatically by GitHub Actions; permissions above must allow issues:read. GITHUB_TOKEN: ${{ github.token }} # Reused by the existing release Slack integration. SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} # New secret for this workflow. SLACK_ISSUE_SUMMARY_CHANNEL_ID: ${{ secrets.SLACK_ISSUE_SUMMARY_CHANNEL_ID }} run: | if [ -z "$SLACK_BOT_TOKEN" ] || [ -z "$SLACK_ISSUE_SUMMARY_CHANNEL_ID" ]; then echo "Missing Slack secrets: SLACK_BOT_TOKEN and/or SLACK_ISSUE_SUMMARY_CHANNEL_ID" exit 1 fi node scripts/issue-digest.mjs --post