ably / repository-audit

Oversight for our estate of repositories, in particular those in the public domain. Audit. Monitor. Conform.
Apache License 2.0
11 stars 2 forks source link

Scheduled workflow run failing with `Error: Event name "schedule" not recognised.` #29

Closed QuintinWillison closed 3 years ago

QuintinWillison commented 3 years ago

See here:

Under 'Run Audit and Generate Report':

Run npm ci
  npm ci
  echo "$APP_PRIVATE_KEY" > app-private-key.pem
  node .
  shell: /usr/bin/bash -e {0}
  env:
    APP_CLIENT_SECRET: ***
    APP_ID: ***
    APP_CLIENT_ID: ***
    APP_PRIVATE_KEY: ***

    APP_INSTALLATION_ID_ABLY: ***
added 552 packages in 5.736s
Executing Query #1...
Executing Query #2...
Error: Event name "schedule" not recognised.
Queried Repository Count: 180
    at GitHub.get branch [as branch] (/home/runner/work/repository-audit/repository-audit/github.js:51:15)
    at audit (/home/runner/work/repository-audit/repository-audit/index.js:165:16)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async /home/runner/work/repository-audit/repository-audit/index.js:21:5
Error: Process completed with exit code 2.
QuintinWillison commented 3 years ago

The 'part 1' change made under https://github.com/ably/repository-audit/pull/33 has delivered what I was looking for, rendering this observation from a 'Scheduled' execution of the run workflow:

GITHUB_EVENT_NAME: schedule
GITHUB_REF: refs/heads/main