diff options
author | Jason Song <i@wolfogre.com> | 2023-03-04 15:12:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-04 02:12:37 -0500 |
commit | 47b912cd526207f831bff759b29a734049d1c8f2 (patch) | |
tree | eb59e9c8ea504339d784b116375ee7dc0e0bffea /web_src/js | |
parent | ca84a61761dc78fea7afe5a692deac7db5368dff (diff) | |
download | gitea-47b912cd526207f831bff759b29a734049d1c8f2.tar.gz gitea-47b912cd526207f831bff759b29a734049d1c8f2.zip |
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>
Diffstat (limited to 'web_src/js')
0 files changed, 0 insertions, 0 deletions