Skip to content

Commit 86afba7

Browse files
authored
Merge branch 'main' into update-go-dep
2 parents 80b79ec + b758241 commit 86afba7

File tree

7 files changed

+13
-26
lines changed

7 files changed

+13
-26
lines changed

routers/api/v1/repo/commits.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func getCommit(ctx *context.APIContext, identifier string, toCommitOpts convert.
7575
commit, err := ctx.Repo.GitRepo.GetCommit(identifier)
7676
if err != nil {
7777
if git.IsErrNotExist(err) {
78-
ctx.APIErrorNotFound(identifier)
78+
ctx.APIErrorNotFound("commit doesn't exist: " + identifier)
7979
return
8080
}
8181
ctx.APIErrorInternal(err)
@@ -310,7 +310,7 @@ func DownloadCommitDiffOrPatch(ctx *context.APIContext) {
310310

311311
if err := git.GetRawDiff(ctx.Repo.GitRepo, sha, diffType, ctx.Resp); err != nil {
312312
if git.IsErrNotExist(err) {
313-
ctx.APIErrorNotFound(sha)
313+
ctx.APIErrorNotFound("commit doesn't exist: " + sha)
314314
return
315315
}
316316
ctx.APIErrorInternal(err)

routers/api/v1/repo/issue_tracked_time.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package repo
55

66
import (
77
"errors"
8-
"fmt"
98
"net/http"
109
"time"
1110

@@ -367,7 +366,7 @@ func DeleteTime(ctx *context.APIContext) {
367366
return
368367
}
369368
if time.Deleted {
370-
ctx.APIErrorNotFound(fmt.Errorf("tracked time [%d] already deleted", time.ID))
369+
ctx.APIErrorNotFound("tracked time was already deleted")
371370
return
372371
}
373372

routers/api/v1/repo/notes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func getNote(ctx *context.APIContext, identifier string) {
7979
var note git.Note
8080
if err := git.GetNote(ctx, ctx.Repo.GitRepo, commitID.String(), &note); err != nil {
8181
if git.IsErrNotExist(err) {
82-
ctx.APIErrorNotFound(identifier)
82+
ctx.APIErrorNotFound("commit doesn't exist: " + identifier)
8383
return
8484
}
8585
ctx.APIErrorInternal(err)

routers/api/v1/repo/tag.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func GetTag(ctx *context.APIContext) {
150150

151151
tag, err := ctx.Repo.GitRepo.GetTag(tagName)
152152
if err != nil {
153-
ctx.APIErrorNotFound(tagName)
153+
ctx.APIErrorNotFound("tag doesn't exist: " + tagName)
154154
return
155155
}
156156
ctx.JSON(http.StatusOK, convert.ToTag(ctx.Repo.Repository, tag))

services/context/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ func RepoRefForAPI(next http.Handler) http.Handler {
313313
ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetCommit(refName)
314314
}
315315
if ctx.Repo.Commit == nil || errors.Is(err, util.ErrNotExist) {
316-
ctx.APIErrorNotFound(fmt.Errorf("not exist: '%s'", ctx.PathParam("*")))
316+
ctx.APIErrorNotFound("unable to find a git ref")
317317
return
318318
} else if err != nil {
319319
ctx.APIErrorInternal(err)

templates/shared/actions/runner_list.tmpl

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,27 +64,23 @@
6464
</tr>
6565
</thead>
6666
<tbody>
67-
{{if .Runners}}
68-
{{range .Runners}}
67+
{{range .Runners}}
6968
<tr>
70-
<td>
71-
<span class="ui {{if .IsOnline}}green{{end}} label">{{.StatusLocaleName ctx.Locale}}</span>
72-
</td>
69+
<td><span class="ui label {{if .IsOnline}}green{{end}}">{{.StatusLocaleName ctx.Locale}}</span></td>
7370
<td>{{.ID}}</td>
7471
<td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
7572
<td>{{if .Version}}{{.Version}}{{else}}{{ctx.Locale.Tr "unknown"}}{{end}}</td>
7673
<td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString ctx.Locale}}</span></td>
77-
<td class="tw-flex tw-flex-wrap tw-gap-2 runner-tags">
78-
{{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}
74+
<td>
75+
<span class="flex-text-inline">{{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}</span>
7976
</td>
8077
<td>{{if .LastOnline}}{{DateUtils.TimeSince .LastOnline}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</td>
81-
<td class="runner-ops">
82-
{{if .Editable $.RunnerOwnerID $.RunnerRepoID}}
83-
<a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
78+
<td>
79+
{{if .EditableInContext $.RunnerOwnerID $.RunnerRepoID}}
80+
<a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
8481
{{end}}
8582
</td>
8683
</tr>
87-
{{end}}
8884
{{else}}
8985
<tr>
9086
<td class="tw-text-center" colspan="8">{{ctx.Locale.Tr "actions.runners.none"}}</td>

web_src/css/actions.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@
66
overflow-x: auto;
77
}
88

9-
.runner-container .runner-ops > a {
10-
margin-left: 0.5em;
11-
}
12-
13-
.runner-container .runner-ops-delete {
14-
color: var(--color-red-light);
15-
}
16-
179
.runner-container .runner-new-text {
1810
color: var(--color-white);
1911
}

0 commit comments

Comments
 (0)