summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/repo.go1
-rw-r--r--modules/structs/repo.go1
-rw-r--r--templates/swagger/v1_json.tmpl5
3 files changed, 7 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index 6c293da6f8..cbe1ccc4f6 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -368,6 +368,7 @@ func (repo *Repository) innerAPIFormat(e Engine, mode AccessMode, isParent bool)
Forks: repo.NumForks,
Watchers: repo.NumWatches,
OpenIssues: repo.NumOpenIssues,
+ OpenPulls: repo.NumOpenPulls,
DefaultBranch: repo.DefaultBranch,
Created: repo.CreatedUnix.AsTime(),
Updated: repo.UpdatedUnix.AsTime(),
diff --git a/modules/structs/repo.go b/modules/structs/repo.go
index ebfb0a0586..283eddb059 100644
--- a/modules/structs/repo.go
+++ b/modules/structs/repo.go
@@ -67,6 +67,7 @@ type Repository struct {
Forks int `json:"forks_count"`
Watchers int `json:"watchers_count"`
OpenIssues int `json:"open_issues_count"`
+ OpenPulls int `json:"open_pr_counter"`
DefaultBranch string `json:"default_branch"`
Archived bool `json:"archived"`
// swagger:strfmt date-time
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 338ab104e9..9c5db48080 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -10329,6 +10329,11 @@
"format": "int64",
"x-go-name": "OpenIssues"
},
+ "open_pr_counter": {
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "OpenPulls"
+ },
"original_url": {
"type": "string",
"x-go-name": "OriginalURL"