From e2dcf52dc1aa6c2b30ea5040d65257539f47c389 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 4 Mar 2024 08:50:41 -0800 Subject: [PATCH] Fix EnforceMaxLifeOfIssues event and run time (#5409) Co-authored-by: James Suplizio --- .github/workflows/scheduled-event-processor.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scheduled-event-processor.yml b/.github/workflows/scheduled-event-processor.yml index 31f97fbb2..361c959bc 100644 --- a/.github/workflows/scheduled-event-processor.yml +++ b/.github/workflows/scheduled-event-processor.yml @@ -15,7 +15,8 @@ on: # Lock closed issues, every 6 hours at 05:30 AM, 11:30 AM, 05:30 PM and 11:30 PM - LockClosedIssues - cron: '30 5,11,17,23 * * *' # Enforce max life of issues, every Monday at 10:00 AM - EnforceMaxLifeOfIssues - - cron: '0 10 * * MON' + # Note: GitHub uses UTC, to run at 10am PST, the cron task needs to be 6pm (1800 hours) UTC + - cron: '0 18 * * MON' # This removes all unnecessary permissions, the ones needed will be set below. # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token permissions: {} @@ -130,9 +131,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Enforce Max Life of Issues Scheduled Event - if: github.event.schedule == '0 10 * * MON' + if: github.event.schedule == '0 18 * * MON' run: | - echo $GITHUB_PAYLOAD > payload.json + cat > payload.json << 'EOF' + ${{ toJson(github.event) }} + EOF github-event-processor ${{ github.event_name }} payload.json EnforceMaxLifeOfIssues shell: bash env: