You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The /api/v1/repos/{owner}/{repo}/actions/runs endpoint returns event: "push" for runs triggered by a schedule: (cron). Inside the workflow, gitea.event_name correctly returns "schedule" (fix from #27667). Filtering event == "schedule" via the API makes scheduled runs appear indistinguishable from push events.
This is asymmetric: the tasks/jobs API correctly uses run.TriggerEvent.
Root cause
ActionRun has two event fields:
Event — the event that registered the schedule (i.e. push on the default branch that added the workflow). Set at services/actions/schedule_tasks.go:129.
Description
The
/api/v1/repos/{owner}/{repo}/actions/runsendpoint returnsevent: "push"for runs triggered by aschedule:(cron). Inside the workflow,gitea.event_namecorrectly returns"schedule"(fix from #27667). Filteringevent == "schedule"via the API makes scheduled runs appear indistinguishable from push events.This is asymmetric: the tasks/jobs API correctly uses
run.TriggerEvent.Root cause
ActionRunhas two event fields:Event— the event that registered the schedule (i.e.pushon the default branch that added the workflow). Set atservices/actions/schedule_tasks.go:129.TriggerEvent— the actual trigger (schedule). Set atservices/actions/schedule_tasks.go:131.The two API converters disagree:
ToActionTask(convert.go:239) — tasks API:Event: t.Job.Run.TriggerEvent✅ToActionWorkflowRun(convert.go:263) — runs API:Event: string(run.Event)❌Bug is also present on
main(same line numbers).Reproduction
.gitea/workflows/cron.yml:GET /api/v1/repos/{owner}/{repo}/actions/runs?limit=1→ returnsevent: "push"withtrigger_actor.login: "gitea-actions".gitea.event_nameprintsschedule— consistent with gitea.event_name set to push when running scheduled #27667 fix.Suggested fix
Change
convert.go:263to match the tasks converter:Gitea Version
1.25.5 (bug also verified on
main)Can you reproduce the bug on the Gitea demo site?
No (not tested, but bug is source-verified on both
v1.25.5andmain)How are you running Gitea?
Docker (
gitea/gitea:1.25.5official image).Database
PostgreSQL