mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-19 20:05:15 +02:00
chore: code lint
This commit is contained in:
parent
b2745bff43
commit
d2a4c10bc7
@ -91,9 +91,7 @@ func CreateCommitStatus(ctx context.Context, job *bots_model.BotRunJob) error {
|
||||
ctxname := job.Name
|
||||
state := toCommitStatus(job.Status)
|
||||
|
||||
if statuses, _, err := git_model.GetLatestCommitStatus(ctx, repo.ID, sha, db.ListOptions{}); err != nil {
|
||||
return fmt.Errorf("GetLatestCommitStatus: %w", err)
|
||||
} else {
|
||||
if statuses, _, err := git_model.GetLatestCommitStatus(ctx, repo.ID, sha, db.ListOptions{}); err == nil {
|
||||
for _, v := range statuses {
|
||||
if v.Context == ctxname {
|
||||
if v.State == state {
|
||||
@ -102,6 +100,8 @@ func CreateCommitStatus(ctx context.Context, job *bots_model.BotRunJob) error {
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("GetLatestCommitStatus: %w", err)
|
||||
}
|
||||
|
||||
if err := git_model.NewCommitStatus(git_model.NewCommitStatusOptions{
|
||||
|
@ -420,7 +420,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if .EnableBots }}
|
||||
{{if .EnableBots}}
|
||||
{{$isBotsEnabled := .Repository.UnitEnabled $.UnitTypeBots}}
|
||||
<div class="inline field">
|
||||
<label>{{.locale.Tr "repo.bots"}}</label>
|
||||
|
Loading…
x
Reference in New Issue
Block a user