Add topics for repository API (#31127)
Fix ##31100 (cherry picked from commit de4616690f742aebc3e019fde5c73c432d543292)
This commit is contained in:
parent
344bf48c9b
commit
ee2247d77c
3 changed files with 9 additions and 0 deletions
|
@ -114,6 +114,7 @@ type Repository struct {
|
||||||
// swagger:strfmt date-time
|
// swagger:strfmt date-time
|
||||||
MirrorUpdated time.Time `json:"mirror_updated,omitempty"`
|
MirrorUpdated time.Time `json:"mirror_updated,omitempty"`
|
||||||
RepoTransfer *RepoTransfer `json:"repo_transfer"`
|
RepoTransfer *RepoTransfer `json:"repo_transfer"`
|
||||||
|
Topics []string `json:"topics"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetName implements the gitrepo.Repository interface
|
// GetName implements the gitrepo.Repository interface
|
||||||
|
|
|
@ -237,6 +237,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
|
||||||
MirrorInterval: mirrorInterval,
|
MirrorInterval: mirrorInterval,
|
||||||
MirrorUpdated: mirrorUpdated,
|
MirrorUpdated: mirrorUpdated,
|
||||||
RepoTransfer: transfer,
|
RepoTransfer: transfer,
|
||||||
|
Topics: repo.Topics,
|
||||||
ObjectFormatName: repo.ObjectFormatName,
|
ObjectFormatName: repo.ObjectFormatName,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
7
templates/swagger/v1_json.tmpl
generated
7
templates/swagger/v1_json.tmpl
generated
|
@ -24234,6 +24234,13 @@
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"x-go-name": "Template"
|
"x-go-name": "Template"
|
||||||
},
|
},
|
||||||
|
"topics": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"x-go-name": "Topics"
|
||||||
|
},
|
||||||
"updated_at": {
|
"updated_at": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time",
|
"format": "date-time",
|
||||||
|
|
Loading…
Reference in a new issue