Skip to content

Commit 7f72fe9

Browse files
authored
Merge branch 'go-gitea:main' into main
2 parents 4e2434b + cbb2e52 commit 7f72fe9

File tree

23 files changed

+89
-60
lines changed

23 files changed

+89
-60
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module code.gitea.io/gitea
22

3-
go 1.24
3+
go 1.24.2
44

55
// rfc5280 said: "The serial number is an integer assigned by the CA to each certificate."
66
// But some CAs use negative serial number, just relax the check. related:

modules/structs/repo_tag.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ type Tag struct {
1111
Message string `json:"message"`
1212
ID string `json:"id"`
1313
Commit *CommitMeta `json:"commit"`
14-
ZipballURL string `json:"zipball_url"`
15-
TarballURL string `json:"tarball_url"`
14+
ZipballURL string `json:"zipball_url,omitempty"`
15+
TarballURL string `json:"tarball_url,omitempty"`
1616
}
1717

1818
// AnnotatedTag represents an annotated tag

modules/structs/user_app.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ import (
1111
// AccessToken represents an API access token.
1212
// swagger:response AccessToken
1313
type AccessToken struct {
14-
ID int64 `json:"id"`
15-
Name string `json:"name"`
16-
Token string `json:"sha1"`
17-
TokenLastEight string `json:"token_last_eight"`
18-
Scopes []string `json:"scopes"`
14+
ID int64 `json:"id"`
15+
Name string `json:"name"`
16+
Token string `json:"sha1"`
17+
TokenLastEight string `json:"token_last_eight"`
18+
Scopes []string `json:"scopes"`
19+
Created time.Time `json:"created_at"`
20+
Updated time.Time `json:"last_used_at"`
1921
}
2022

2123
// AccessTokenList represents a list of API access token.

modules/structs/user_key.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ type PublicKey struct {
1616
Fingerprint string `json:"fingerprint,omitempty"`
1717
// swagger:strfmt date-time
1818
Created time.Time `json:"created_at,omitempty"`
19+
Updated time.Time `json:"last_used_at,omitempty"`
1920
Owner *User `json:"user,omitempty"`
2021
ReadOnly bool `json:"read_only,omitempty"`
2122
KeyType string `json:"key_type,omitempty"`

options/locale/locale_ga-IE.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ use_scratch_code=Úsáid cód scratch
450450
twofa_scratch_used=D'úsáid tú do chód scratch. Tá tú atreoraithe chuig an leathanach socruithe dhá fhachtóir ionas gur féidir leat clárú do ghléas a bhaint nó cód scratch nua a ghiniúint.
451451
twofa_passcode_incorrect=Tá do phaschód mícheart. Má chuir tú do ghléas míchuir tú, bain úsáid as do chód scratch chun síniú isteach.
452452
twofa_scratch_token_incorrect=Tá do chód scratch mícheart.
453+
twofa_required=Ní mór duit Fíordheimhniú Dhá Fhachtóir a shocrú chun rochtain a fháil ar stórtha, nó iarracht a dhéanamh logáil isteach arís.
453454
login_userpass=Sínigh isteach
454455
login_openid=OpenID
455456
oauth_signup_tab=Cláraigh Cuntas Nua

options/locale/locale_pt-PT.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ use_scratch_code=Usar um código de recuperação
450450
twofa_scratch_used=Você usou o seu código de recuperação. Foi reencaminhado para a página de configurações da autenticação em dois passos para poder remover o registo do seu dispositivo ou gerar um novo código de recuperação.
451451
twofa_passcode_incorrect=A senha está errada. Se perdeu o seu dispositivo, use o código de recuperação para iniciar a sessão.
452452
twofa_scratch_token_incorrect=O código de recuperação está errado.
453+
twofa_required=Tem de configurar a autenticação em dois passos para obter acesso aos repositórios ou então tentar iniciar a sessão novamente.
453454
login_userpass=Iniciar sessão
454455
login_openid=OpenID
455456
oauth_signup_tab=Fazer inscrição

routers/api/v1/user/app.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ func ListAccessTokens(ctx *context.APIContext) {
6262
Name: tokens[i].Name,
6363
TokenLastEight: tokens[i].TokenLastEight,
6464
Scopes: tokens[i].Scope.StringSlice(),
65+
Created: tokens[i].CreatedUnix.AsTime(),
66+
Updated: tokens[i].UpdatedUnix.AsTime(),
6567
}
6668
}
6769

services/convert/convert.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,22 @@ func ToBranchProtection(ctx context.Context, bp *git_model.ProtectedBranch, repo
197197

198198
// ToTag convert a git.Tag to an api.Tag
199199
func ToTag(repo *repo_model.Repository, t *git.Tag) *api.Tag {
200+
tarballURL := util.URLJoin(repo.HTMLURL(), "archive", t.Name+".tar.gz")
201+
zipballURL := util.URLJoin(repo.HTMLURL(), "archive", t.Name+".zip")
202+
203+
// Archive URLs are "" if the download feature is disabled
204+
if setting.Repository.DisableDownloadSourceArchives {
205+
tarballURL = ""
206+
zipballURL = ""
207+
}
208+
200209
return &api.Tag{
201210
Name: t.Name,
202211
Message: strings.TrimSpace(t.Message),
203212
ID: t.ID.String(),
204213
Commit: ToCommitMeta(repo, t),
205-
ZipballURL: util.URLJoin(repo.HTMLURL(), "archive", t.Name+".zip"),
206-
TarballURL: util.URLJoin(repo.HTMLURL(), "archive", t.Name+".tar.gz"),
214+
ZipballURL: zipballURL,
215+
TarballURL: tarballURL,
207216
}
208217
}
209218

@@ -307,6 +316,7 @@ func ToPublicKey(apiLink string, key *asymkey_model.PublicKey) *api.PublicKey {
307316
Title: key.Name,
308317
Fingerprint: key.Fingerprint,
309318
Created: key.CreatedUnix.AsTime(),
319+
Updated: key.UpdatedUnix.AsTime(),
310320
}
311321
}
312322

templates/repo/issue/sidebar/assignee_list.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
{{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/assignee?issue_ids={{$pageMeta.Issue.ID}}"{{end}}
77
>
88
<input class="combo-value" name="assignee_ids" type="hidden" value="{{$data.SelectedAssigneeIDs}}">
9-
<div class="ui dropdown text-flex-grow {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}">
10-
<a class="text muted">
9+
<div class="ui dropdown full-width {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}">
10+
<a class="fixed-text muted">
1111
<strong>{{ctx.Locale.Tr "repo.issues.new.assignees"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}}
1212
</a>
1313
<div class="menu">
@@ -16,7 +16,7 @@
1616
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_assignees"}}">
1717
</div>
1818
<div class="scrolling menu flex-items-block">
19-
<div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}</div>
19+
<div class="item clear-selection" data-text="">{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}</div>
2020
<div class="divider"></div>
2121
{{range $data.CandidateAssignees}}
2222
<a class="item" href="#" data-value="{{.ID}}">

templates/repo/issue/sidebar/label_list.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
{{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/labels?issue_ids={{$pageMeta.Issue.ID}}"{{end}}
55
>
66
<input class="combo-value" name="label_ids" type="hidden" value="{{$data.SelectedLabelIDs}}">
7-
<div class="ui dropdown text-flex-grow {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}">
8-
<a class="text muted">
7+
<div class="ui dropdown full-width {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}">
8+
<a class="fixed-text muted">
99
<strong>{{ctx.Locale.Tr "repo.issues.new.labels"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}}
1010
</a>
1111
<div class="menu">
@@ -17,7 +17,7 @@
1717
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_labels"}}">
1818
</div>
1919
<div class="scrolling menu">
20-
<a class="item clear-selection" href="#">{{ctx.Locale.Tr "repo.issues.new.clear_labels"}}</a>
20+
<a class="item clear-selection" data-text="" href="#">{{ctx.Locale.Tr "repo.issues.new.clear_labels"}}</a>
2121
<div class="divider"></div>
2222
{{$previousExclusiveScope := "_no_scope"}}
2323
{{range $data.RepoLabels}}

0 commit comments

Comments
 (0)