Browse Source
[API] expose RepoOwner on Issue responce (#10126)
* add RepoOwner on issue api responce
* CI.restart()
for-closed-social
6543
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
6 additions and
0 deletions
-
models/issue.go
-
modules/structs/issue.go
-
templates/swagger/v1_json.tmpl
|
|
@ -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(), |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -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"` |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -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" |
|
|
|