mirror of
https://github.com/go-gitea/gitea
synced 2025-07-04 01:27:20 +00:00
Fix actions skipped commit status indicator (#34507)
Addresses https://github.com/go-gitea/gitea/issues/34500 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -59,7 +59,11 @@ func UpdateCommitStatusSummary(ctx context.Context, repoID int64, sha string) er
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
state := CalcCommitStatus(commitStatuses)
|
||||
// it guarantees that commitStatuses is not empty because this function is always called after a commit status is created
|
||||
if len(commitStatuses) == 0 {
|
||||
setting.PanicInDevOrTesting("no commit statuses found for repo %d and sha %s", repoID, sha)
|
||||
}
|
||||
state := CalcCommitStatus(commitStatuses) // non-empty commitStatuses is guaranteed
|
||||
// mysql will return 0 when update a record which state hasn't been changed which behaviour is different from other database,
|
||||
// so we need to use insert in on duplicate
|
||||
if setting.Database.Type.IsMySQL() {
|
||||
|
Reference in New Issue
Block a user