diff --git a/.github/workflows/close-spam-issues.yaml b/.github/workflows/close-spam-issues.yaml index 22f70db5326f..6897db06e284 100644 --- a/.github/workflows/close-spam-issues.yaml +++ b/.github/workflows/close-spam-issues.yaml @@ -3,7 +3,7 @@ name: Close Spam Issues on: schedule: - cron: '*/20 * * * *' # Runs every 20 minutes - workflow_dispatch: + workflow_dispatch: jobs: close_spam_issues: @@ -15,7 +15,7 @@ jobs: script: | // ADD SPAM USERS TO THIS LIST const spamUsers = ['Krakensu']; - const issueCreator = context.payload.issue.user.login; + const issueCreator = context.payload.issue ? context.payload.issue.user.login : null; async function closeSpamIssues() { const issues = await github.paginate(github.rest.issues.listForRepo, { owner: context.repo.owner,