mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 10:04:02 +01:00
Add release_counter to Repo API (#9214)
This commit is contained in:
parent
61c59bd695
commit
7c6f2e27be
3 changed files with 7 additions and 0 deletions
|
@ -368,6 +368,7 @@ func (repo *Repository) innerAPIFormat(e Engine, mode AccessMode, isParent bool)
|
||||||
Watchers: repo.NumWatches,
|
Watchers: repo.NumWatches,
|
||||||
OpenIssues: repo.NumOpenIssues,
|
OpenIssues: repo.NumOpenIssues,
|
||||||
OpenPulls: repo.NumOpenPulls,
|
OpenPulls: repo.NumOpenPulls,
|
||||||
|
Releases: repo.NumReleases,
|
||||||
DefaultBranch: repo.DefaultBranch,
|
DefaultBranch: repo.DefaultBranch,
|
||||||
Created: repo.CreatedUnix.AsTime(),
|
Created: repo.CreatedUnix.AsTime(),
|
||||||
Updated: repo.UpdatedUnix.AsTime(),
|
Updated: repo.UpdatedUnix.AsTime(),
|
||||||
|
|
|
@ -68,6 +68,7 @@ type Repository struct {
|
||||||
Watchers int `json:"watchers_count"`
|
Watchers int `json:"watchers_count"`
|
||||||
OpenIssues int `json:"open_issues_count"`
|
OpenIssues int `json:"open_issues_count"`
|
||||||
OpenPulls int `json:"open_pr_counter"`
|
OpenPulls int `json:"open_pr_counter"`
|
||||||
|
Releases int `json:"release_counter"`
|
||||||
DefaultBranch string `json:"default_branch"`
|
DefaultBranch string `json:"default_branch"`
|
||||||
Archived bool `json:"archived"`
|
Archived bool `json:"archived"`
|
||||||
// swagger:strfmt date-time
|
// swagger:strfmt date-time
|
||||||
|
|
|
@ -10351,6 +10351,11 @@
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"x-go-name": "Private"
|
"x-go-name": "Private"
|
||||||
},
|
},
|
||||||
|
"release_counter": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64",
|
||||||
|
"x-go-name": "Releases"
|
||||||
|
},
|
||||||
"size": {
|
"size": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int64",
|
"format": "int64",
|
||||||
|
|
Loading…
Reference in a new issue