Skip to content

Commit 7c6f2e2

Browse files
6543techknowlogick
authored andcommitted
Add release_counter to Repo API (#9214)
1 parent 61c59bd commit 7c6f2e2

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
@@ -368,6 +368,7 @@ func (repo *Repository) innerAPIFormat(e Engine, mode AccessMode, isParent bool)
368368
Watchers: repo.NumWatches,
369369
OpenIssues: repo.NumOpenIssues,
370370
OpenPulls: repo.NumOpenPulls,
371+
Releases: repo.NumReleases,
371372
DefaultBranch: repo.DefaultBranch,
372373
Created: repo.CreatedUnix.AsTime(),
373374
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)