-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Summary
In our repo, two GitHub Actions behaviors look broken/non‑intuitive:
issue_comment
events do not schedule any jobs for a workflow that clearly matches the event. The same workflow always shows "push" runs with 0 jobs, but never anissue_comment
run with jobs.- For a newly added workflow,
gh workflow enable
+gh workflow run
creates workflow runs that have 0 jobs. Only wiring the steps into an existing enabled workflow made the jobs run.
Repository
- grahama1970/graph-memory-operator (public)
Workflows
- Path:
.github/workflows/codex-trigger.yml
on:
includes:issues: { types: [labeled] } issue_comment: { types: [created] }
- Job
if:
matches/codex ...
and@codex ...
comment prefixes (we tested both):(github.event_name == 'issue_comment' && ( startsWith(github.event.comment.body, '/codex start') || startsWith(github.event.comment.body, '/codex high') || startsWith(github.event.comment.body, '@codex start') || startsWith(github.event.comment.body, '@codex high') || startsWith(github.event.comment.body, '@codex') ))
- Path:
.github/workflows/smokes-youtube.yml
- Newly added.
gh workflow enable
+gh workflow run --ref main
created runs, but with 0 jobs.
- Newly added.
What we did
- Posted
@codex start high
and/codex start high
comments on open PRs (cleanup back compat code #21, secrets context #22) using repo owner account. - Labeled issues with
ready-for-agent
. - Confirmed workflow file and conditions on default branch (main).
- Permissions: repo Settings → Actions → Allow all actions; Workflow permissions: read & write.
- Added explicit top-level/job-level permissions in the workflow:
issues: write
,contents: read
. - For the "enable" case, also tried
gh api repos/<repo>/actions/workflows/<id>/enable
and manualworkflow_dispatch
.
Observed
- For
.github/workflows/codex-trigger.yml
, Actions UI shows only "push" runs; run IDs have 0 jobs:- Examples (from
gh run list --workflow .github/workflows/codex-trigger.yml
):- 17837648581 (push) — status=completed, jobs=[]
- 17837622871 (push) — status=completed, jobs=[]
- Examples (from
- No "issue_comment" runs were scheduled despite comments matching the
if:
. - For
.github/workflows/smokes-youtube.yml
,workflow_dispatch
created runs with 0 jobs. - As a control, when we moved the YouTube steps into an already-enabled workflow (
smokes-qa.yml
), jobs executed as expected.
Expected
issue_comment
should schedule a job when the workflow matches and theif:
evaluates true.- After enabling a new workflow,
workflow_dispatch
should create a run with at least one job, not a 0‑job run.
Notes / Run Context
- PRs used for comments: cleanup back compat code #21, secrets context #22 (same repo; not a fork).
- We can provide exact timestamps if needed; above IDs are from the same time window.
- We also tested a repository_dispatch path (separate workflow) and it ran correctly — so runners and permissions are generally working.
Ask
- Are we hitting a product limitation around
issue_comment
for this repo/config (e.g., security hardening), or is this a bug? - Why would
workflow_dispatch
runs be created with 0 jobs aftergh workflow enable
, and what’s the correct way to ensure immediate scheduling without manual UI clicks?
Thanks for pointers; happy to attach sanitized workflow YAML and add more IDs if helpful.
Metadata
Metadata
Assignees
Labels
No labels