瀏覽代碼

[API] expose RepoOwner on Issue responce (#10126)

* add RepoOwner on issue api responce

* CI.restart()
tags/v1.10.5
6543 4 年之前
父節點
當前提交
b3c72a7c4a
沒有連結到貢獻者的電子郵件帳戶。
共有 3 個檔案被更改,包括 6 行新增0 行删除
  1. 1
    0
      models/issue.go
  2. 1
    0
      modules/structs/issue.go
  3. 4
    0
      templates/swagger/v1_json.tmpl

+ 1
- 0
models/issue.go 查看文件

@@ -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(),
}


+ 1
- 0
modules/structs/issue.go 查看文件

@@ -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"`
}


+ 4
- 0
templates/swagger/v1_json.tmpl 查看文件

@@ -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"

Loading…
取消
儲存