Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3a1320c

Browse files
authored
Merge branch 'main' into dev/hezi/fix-run-name
2 parents11e23c2 +cbb2e52 commit3a1320c

File tree

7 files changed

+40
-10
lines changed

7 files changed

+40
-10
lines changed

‎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
Messagestring`json:"message"`
1212
IDstring`json:"id"`
1313
Commit*CommitMeta`json:"commit"`
14-
ZipballURLstring`json:"zipball_url"`
15-
TarballURLstring`json:"tarball_url"`
14+
ZipballURLstring`json:"zipball_url,omitempty"`
15+
TarballURLstring`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
typeAccessTokenstruct {
14-
IDint64`json:"id"`
15-
Namestring`json:"name"`
16-
Tokenstring`json:"sha1"`
17-
TokenLastEightstring`json:"token_last_eight"`
18-
Scopes []string`json:"scopes"`
14+
IDint64`json:"id"`
15+
Namestring`json:"name"`
16+
Tokenstring`json:"sha1"`
17+
TokenLastEightstring`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
Fingerprintstring`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
ReadOnlybool`json:"read_only,omitempty"`
2122
KeyTypestring`json:"key_type,omitempty"`

‎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
funcToTag(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+
ifsetting.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/shared/repo_search.tmpl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="ui small secondary filter menu">
2-
<form id="repo-search-form" class="ui form ignore-dirty tw-flex-1 tw-flex tw-gap-x-2">
2+
<form id="repo-search-form" class="ui form ignore-dirty tw-flex-1 tw-flex tw-items-center tw-gap-x-2">
33
{{if .Language}}<input type="hidden" name="language" value="{{.Language}}">{{end}}
44
{{if .PageIsExploreRepositories}}<input type="hidden" name="only_show_relevant" value="{{.OnlyShowRelevant}}">{{end}}
55
{{if .TabName}}<input type="hidden" name="tab" value="{{.TabName}}">{{end}}

‎templates/swagger/v1_json.tmpl‎

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp