From 1ea7ad1defd0284c2aa59a533af03c4c3f971826 Mon Sep 17 00:00:00 2001 From: Fabio Turizo Date: Thu, 21 Sep 2023 15:43:49 -0500 Subject: [PATCH] Re-added missing workflow --- .../workflows/monitor-abandoned-issues.yaml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/monitor-abandoned-issues.yaml diff --git a/.github/workflows/monitor-abandoned-issues.yaml b/.github/workflows/monitor-abandoned-issues.yaml new file mode 100644 index 0000000..8b04f46 --- /dev/null +++ b/.github/workflows/monitor-abandoned-issues.yaml @@ -0,0 +1,42 @@ +name: Monitor Abandoned Issues +#Runs at minute 0 past every 48th hour +on: + schedule: + - cron: "0 */48 * * *" +env: + daysInterval: ${{ vars.MONITORING_INTERVAL_DAYS }} +jobs: + check-environment: + runs-on: ubuntu-latest + steps: + - run: | + if [ -z $daysInterval ]; then + echo "::error::'MONITORING_INTERVAL_DAYS' environment variable is not set" + exit 1 + fi + check-abandoned-issues: + needs: check-environment + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/checkout@v3 + - name: Monitor abandoned issues + uses: actions/github-script@v6 + with: + script: | + const script = require('./.github/workflows/scripts/checkAbandonedIssues.js'); + await script({github, context, core}); + close-abandoned-issues: + needs: check-environment + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/checkout@v3 + - name: Close abandoned issues + uses: actions/github-script@v6 + with: + script: | + const script = require('./.github/workflows/scripts/closeAbandonedIssues.js'); + await script({github, context, core});