Skip to content

skip actor permission check for schedule (cron) triggers#73

Open
ikeisuke wants to merge 1 commit intoopenai:mainfrom
ikeisuke:feat/skip-permission-check-on-schedule
Open

skip actor permission check for schedule (cron) triggers#73
ikeisuke wants to merge 1 commit intoopenai:mainfrom
ikeisuke:feat/skip-permission-check-on-schedule

Conversation

@ikeisuke
Copy link

@ikeisuke ikeisuke commented Mar 4, 2026

When a workflow is triggered by schedule, GitHub sets GITHUB_ACTOR to the user who last modified the cron syntax — not the user who triggered the run. This can cause the permission check to fail unexpectedly.

Since only users with write access can modify workflow files, schedule runs don't have a meaningful triggering actor. This PR passes github.event_name into the check-write-access command and skips the actor permission check for schedule events.

Test plan

  • npm run build succeeds
  • GITHUB_EVENT_NAME=schedule skips the permission check with an info log
  • Other events (push, pull_request, etc.) behave as before

Scheduled workflows set GITHUB_ACTOR to the user who last modified the
cron syntax in the workflow file, not a meaningful triggering user.
Since only users with write access can modify workflow files, schedule
events are implicitly authorized. This avoids spurious permission check
failures on cron runs.
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@ikeisuke
Copy link
Author

ikeisuke commented Mar 4, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant