From be36758f5b84ddbac867d25f600c32f9bc9b6411 Mon Sep 17 00:00:00 2001 From: Aocheng Wang Date: Mon, 2 Dec 2024 16:23:41 +0800 Subject: [PATCH] fix: environment variable syntax --- .github/policies/scheduler.yml | 42 +++++++++++----------- .github/scripts/notify-issues.js | 4 ++- .github/workflows/scheduleNotification.yml | 9 ++--- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/.github/policies/scheduler.yml b/.github/policies/scheduler.yml index ebfd802..519029c 100644 --- a/.github/policies/scheduler.yml +++ b/.github/policies/scheduler.yml @@ -12,19 +12,19 @@ configuration: frequencies: - weekday: day: Monday - time: 0:0 + time: 23:00 - weekday: day: Tuesday - time: 0:0 + time: 23:00 - weekday: day: Wednesday - time: 0:0 + time: 23:00 - weekday: day: Thursday - time: 0:0 + time: 23:00 - weekday: day: Friday - time: 0:0 + time: 23:00 filters: - isIssue - isOpen @@ -48,19 +48,19 @@ configuration: frequencies: - weekday: day: Monday - time: 0:0 + time: 23:00 - weekday: day: Tuesday - time: 0:0 + time: 23:00 - weekday: day: Wednesday - time: 0:0 + time: 23:00 - weekday: day: Thursday - time: 0:0 + time: 23:00 - weekday: day: Friday - time: 0:0 + time: 23:00 filters: - isOpen - isIssue @@ -83,19 +83,19 @@ configuration: frequencies: - weekday: day: Monday - time: 0:0 + time: 23:00 - weekday: day: Tuesday - time: 0:0 + time: 23:00 - weekday: day: Wednesday - time: 0:0 + time: 23:00 - weekday: day: Thursday - time: 0:0 + time: 23:00 - weekday: day: Friday - time: 0:0 + time: 23:00 filters: - isIssue - isOpen @@ -117,19 +117,19 @@ configuration: frequencies: - weekday: day: Monday - time: 0:0 + time: 23:00 - weekday: day: Tuesday - time: 0:0 + time: 23:00 - weekday: day: Wednesday - time: 0:0 + time: 23:00 - weekday: day: Thursday - time: 0:0 + time: 23:00 - weekday: day: Friday - time: 0:0 + time: 23:00 filters: - isIssue - isOpen @@ -150,7 +150,7 @@ configuration: - description: "[Close Issue Management] For issue with close-wait label" frequencies: - daily: - time: 1:0 + time: 0:0 filters: - isOpen - isIssue diff --git a/.github/scripts/notify-issues.js b/.github/scripts/notify-issues.js index b8c345b..dc43eae 100644 --- a/.github/scripts/notify-issues.js +++ b/.github/scripts/notify-issues.js @@ -60,7 +60,9 @@ async function main() { console.log(`Sending email to ${email} for issue ${JSON.stringify(issues)}`); const body = `

Hi, here are GitHub issues that needs your attention:

-${issues.map((issue) =>`

#${issue.number}: ${issue.title} (${issue.url})

`)} +${issues.map((issue) =>`

#${issue.number}: ${issue.title} (${issue.url})

+
+

* Remove the "needs attention" or close the issue in order not to receive this notification.

`)} `; await sendEmail( email, diff --git a/.github/workflows/scheduleNotification.yml b/.github/workflows/scheduleNotification.yml index ce53f94..e308867 100755 --- a/.github/workflows/scheduleNotification.yml +++ b/.github/workflows/scheduleNotification.yml @@ -15,8 +15,9 @@ jobs: - name: Check issues that needs attention run: node .github/scripts/notify-issues.js env: - REPO_MAINTAINERS: ${{ env.REPO_MAINTAINERS }} - WORKFLOW_MAINTAINER_EMAIL: ${{ env.SCHEDULED_NOTIFICATION_MAINTAINER_EMAIL }} - MAIL_CLIENT_ID: ${{ secrets.EMAIL_CLIENT_ID }} + REPO_MAINTAINERS: ${{ vars.REPO_MAINTAINERS }} + WORKFLOW_MAINTAINER_EMAIL: ${{ vars.SCHEDULED_NOTIFICATION_MAINTAINER_EMAIL }} + MAIL_TENANT_ID: ${{ vars.EMAIL_TENANT_ID }} + MAIL_CLIENT_ID: ${{ vars.EMAIL_CLIENT_ID }} MAIL_CLIENT_SECRET: ${{ secrets.EMAIL_CLIENT_SECRET }} - MAIL_TENANT_ID: ${{ secrets.EMAIL_TENANT_ID }} \ No newline at end of file + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file