mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-19 15:14:40 +09:00
fix(repo): limit the commit status fields returned by repo search (#40377)
The web repo search response embedded the whole commit status model although the dashboard only uses its state and target URL. It now returns just those two fields. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
2b30d077b8
commit
0a66642da0
5 files changed
+74
-11
No files matched your search
@@ -39,7 +39,7 @@ type CommitStatus struct {
|
||||
RepoID int64 `xorm:"UNIQUE(repo_sha_index)"`
|
||||
SHA string `xorm:"VARCHAR(64) NOT NULL INDEX UNIQUE(repo_sha_index)"`
|
||||
Index int64 `xorm:"INDEX UNIQUE(repo_sha_index)"`
|
||||
Repo *repo_model.Repository `xorm:"-"`
|
||||
Repo *repo_model.Repository `xorm:"-" json:"-"`
|
||||
State commitstatus.CommitStatusState `xorm:"VARCHAR(7) NOT NULL"`
|
||||
|
||||
// TargetURL points to the commit status page reported by a CI system
|
||||
@@ -49,7 +49,7 @@ type CommitStatus struct {
|
||||
Description string `xorm:"TEXT"`
|
||||
ContextHash string `xorm:"VARCHAR(64) index"`
|
||||
Context string `xorm:"TEXT"`
|
||||
Creator *user_model.User `xorm:"-"`
|
||||
Creator *user_model.User `xorm:"-" json:"-"`
|
||||
CreatorID int64
|
||||
|
||||
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
|
||||
|
||||
Reference in new issue
Block a user