Skip to content

Commit b3c72a7

Browse files
authored
[API] expose RepoOwner on Issue responce (#10126)
* add RepoOwner on issue api responce * CI.restart()
1 parent 3ff95ce commit b3c72a7

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

models/issue.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ func (issue *Issue) apiFormat(e Engine) *api.Issue {
398398
apiIssue.Repo = &api.RepositoryMeta{
399399
ID: issue.Repo.ID,
400400
Name: issue.Repo.Name,
401+
Owner: issue.Repo.OwnerName,
401402
FullName: issue.Repo.FullName(),
402403
}
403404

modules/structs/issue.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type PullRequestMeta struct {
3030
type RepositoryMeta struct {
3131
ID int64 `json:"id"`
3232
Name string `json:"name"`
33+
Owner string `json:"owner"`
3334
FullName string `json:"full_name"`
3435
}
3536

templates/swagger/v1_json.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12350,6 +12350,10 @@
1235012350
"name": {
1235112351
"type": "string",
1235212352
"x-go-name": "Name"
12353+
},
12354+
"owner": {
12355+
"type": "string",
12356+
"x-go-name": "Owner"
1235312357
}
1235412358
},
1235512359
"x-go-package": "code.gitea.io/gitea/modules/structs"

0 commit comments

Comments
 (0)