forgejo-federation/routers
Jason Song 47b912cd52
Avoid panic caused by broken payload when creating commit status (#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: delvh <dev.lh@web.de>
2023-03-04 02:12:37 -05:00
..
api Avoid panic caused by broken payload when creating commit status (#23216) 2023-03-04 02:12:37 -05:00
common Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
install Fix various bugs for "install" page (#23194) 2023-03-04 10:12:02 +08:00
private Use context parameter in services/repository (#23186) 2023-02-28 16:17:51 -06:00
utils Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
web Avoid panic caused by broken payload when creating commit status (#23216) 2023-03-04 02:12:37 -05:00
init.go Avoid warning for system setting when start up (#23054) 2023-02-24 18:23:13 +08:00