Skip to content

Commit e8896a3

Browse files
committed
Add release_counter to Repo API
1 parent 8f8c250 commit e8896a3

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

models/repo.go

+1
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ func (repo *Repository) innerAPIFormat(e Engine, mode AccessMode, isParent bool)
369369
Watchers: repo.NumWatches,
370370
OpenIssues: repo.NumOpenIssues,
371371
OpenPulls: repo.NumOpenPulls,
372+
Releases: repo.NumReleases,
372373
DefaultBranch: repo.DefaultBranch,
373374
Created: repo.CreatedUnix.AsTime(),
374375
Updated: repo.UpdatedUnix.AsTime(),

modules/structs/repo.go

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ type Repository struct {
6868
Watchers int `json:"watchers_count"`
6969
OpenIssues int `json:"open_issues_count"`
7070
OpenPulls int `json:"open_pr_counter"`
71+
Releases int `json:"release_counter"`
7172
DefaultBranch string `json:"default_branch"`
7273
Archived bool `json:"archived"`
7374
// swagger:strfmt date-time

templates/swagger/v1_json.tmpl

+5
Original file line numberDiff line numberDiff line change
@@ -10351,6 +10351,11 @@
1035110351
"type": "boolean",
1035210352
"x-go-name": "Private"
1035310353
},
10354+
"release_counter": {
10355+
"type": "integer",
10356+
"format": "int64",
10357+
"x-go-name": "Releases"
10358+
},
1035410359
"size": {
1035510360
"type": "integer",
1035610361
"format": "int64",

0 commit comments

Comments
 (0)