0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-25 00:44:15 -05:00
forgejo/services/actions
Giteabot a4158d1904
Avoid panic caused by broken payload when creating commit status (#23216) (#23294)
Backport #23216

When creating commit status for Actons jobs, a payload with nil
`HeadCommit` will cause panic.

Reported at:
https://gitea.com/gitea/act_runner/issues/28#issuecomment-732166

Although the `HeadCommit` probably can not be nil after #23215,
`CreateCommitStatus` should protect itself, to avoid being broken in the
future.

In addition, it's enough to print error log instead of returning err
when `CreateCommitStatus` failed.

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: delvh <dev.lh@web.de>
2023-03-04 14:23:49 +00:00
..
clear_tasks.go Avoid panic caused by broken payload when creating commit status (#23216) (#23294) 2023-03-04 14:23:49 +00:00
commit_status.go Avoid panic caused by broken payload when creating commit status (#23216) (#23294) 2023-03-04 14:23:49 +00:00
init.go
job_emitter.go
job_emitter_test.go
notifier.go Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
notifier_helper.go Avoid panic caused by broken payload when creating commit status (#23216) (#23294) 2023-03-04 14:23:49 +00:00