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