Skip to content

Commit d7c1310

Browse files
6543lunny
authored andcommitted
expose PR counter on Repo API (#9202)
1 parent e151674 commit d7c1310

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

models/repo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ func (repo *Repository) innerAPIFormat(e Engine, mode AccessMode, isParent bool)
368368
Forks: repo.NumForks,
369369
Watchers: repo.NumWatches,
370370
OpenIssues: repo.NumOpenIssues,
371+
OpenPulls: repo.NumOpenPulls,
371372
DefaultBranch: repo.DefaultBranch,
372373
Created: repo.CreatedUnix.AsTime(),
373374
Updated: repo.UpdatedUnix.AsTime(),

modules/structs/repo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ type Repository struct {
6767
Forks int `json:"forks_count"`
6868
Watchers int `json:"watchers_count"`
6969
OpenIssues int `json:"open_issues_count"`
70+
OpenPulls int `json:"open_pr_counter"`
7071
DefaultBranch string `json:"default_branch"`
7172
Archived bool `json:"archived"`
7273
// swagger:strfmt date-time

templates/swagger/v1_json.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10329,6 +10329,11 @@
1032910329
"format": "int64",
1033010330
"x-go-name": "OpenIssues"
1033110331
},
10332+
"open_pr_counter": {
10333+
"type": "integer",
10334+
"format": "int64",
10335+
"x-go-name": "OpenPulls"
10336+
},
1033210337
"original_url": {
1033310338
"type": "string",
1033410339
"x-go-name": "OriginalURL"

0 commit comments

Comments
 (0)