chore: update pull_request_approved workflow (#60537)

## Description
Updating
https://github.com/vercel/next.js/blob/canary/.github/workflows/pull_request_approved.yml
and related.

## Changes
- Fix path so workflow runs
- Update cron schedule to be on a weekly basis on instead of daily
- Update Slack channel

Closes NEXT-2068

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
This commit is contained in:
Sam Ko 2024-01-11 13:34:42 -08:00 committed by GitHub
parent 9b7a5c0bbf
commit 2138facc12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

File diff suppressed because one or more lines are too long

View file

@ -20,9 +20,9 @@ async function run() {
if (pendingPRs) {
await slackClient.chat.postMessage({
channel: '#coord-next-turbopack',
text: `🤖 Pending PRs for Next.js: There are <https://github.com/vercel/next.js/pulls?q=is%3Apr+is%3Aopen+review%3Aapproved+-is%3Adraft|${prs.data.items.length} PRs> awaiting merge.`,
username: 'GitHub Notifier',
channel: '#next-js-repo-udpates',
text: `Pending PRs for Next.js: There are <https://github.com/vercel/next.js/pulls?q=is%3Apr+is%3Aopen+review%3Aapproved+-is%3Adraft|${prs.data.items.length} PRs> awaiting merge.`,
username: 'GitHub',
icon_emoji: ':github:',
})

View file

@ -2,7 +2,7 @@ name: Notify about approved but still open PRs
on:
schedule:
- cron: '0 0 * * *' # Once a day
- cron: '0 13 2-30/2 * *' # Every even day of the month at 1PM UTC (9AM EST)
workflow_dispatch:
jobs:
@ -16,7 +16,7 @@ jobs:
node-version: 18
- run: corepack enable
- name: 'Send notification to Slack'
run: node ./.github/actions/pr-approved-open/index.mjs
run: node ./.github/actions/pr-approved-open/dist/index.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}