Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid panic caused by broken payload when creating commit status (#23216) #23294

Merged
merged 1 commit into from
Mar 4, 2023

Commits on Mar 4, 2023

  1. Avoid panic caused by broken payload when creating commit status (go-…

    …gitea#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 go-gitea#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 <[email protected]>
    2 people authored and GiteaBot committed Mar 4, 2023
    Configuration menu
    Copy the full SHA
    0e826ea View commit details
    Browse the repository at this point in the history