Skip to content

Commit

Permalink
[API] expose RepoOwner on Issue responce (#10126)
Browse files Browse the repository at this point in the history
* add RepoOwner on issue api responce

* CI.restart()
  • Loading branch information
6543 committed Feb 4, 2020
1 parent 3ff95ce commit b3c72a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions models/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ func (issue *Issue) apiFormat(e Engine) *api.Issue {
apiIssue.Repo = &api.RepositoryMeta{
ID: issue.Repo.ID,
Name: issue.Repo.Name,
Owner: issue.Repo.OwnerName,
FullName: issue.Repo.FullName(),
}

Expand Down
1 change: 1 addition & 0 deletions modules/structs/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type PullRequestMeta struct {
type RepositoryMeta struct {
ID int64 `json:"id"`
Name string `json:"name"`
Owner string `json:"owner"`
FullName string `json:"full_name"`
}

Expand Down
4 changes: 4 additions & 0 deletions templates/swagger/v1_json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12350,6 +12350,10 @@
"name": {
"type": "string",
"x-go-name": "Name"
},
"owner": {
"type": "string",
"x-go-name": "Owner"
}
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
Expand Down

0 comments on commit b3c72a7

Please sign in to comment.