1
0
Fork 0
forked from forgejo/forgejo

[Refactor] CombinedStatus and CommitStatus related functions & structs (#14026)

* RM unused struct

* rename (*CommitStatus) loadRepo() -> loadAttributes()

* move ToCommitStatus into its own file

* use CommitStatusState instead of StatusState

* move CombinedStatus convertion into convert package

* let models.GetLatestCommitStatus use repoID direct and accept ListOptions

* update swagger docs

* fix tests

* Fix swagger docs

* rm page

* fix swagger docs!!!

* return json null

* always return json

* rename api.Status to api.CommitStatus

* fix swagger docs

* sec swagger fix
This commit is contained in:
6543 2020-12-18 03:33:32 +00:00 committed by GitHub
parent 27edc1aa19
commit e483220ea3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 341 additions and 206 deletions

View file

@ -169,18 +169,18 @@ type swaggerResponsePullReviewCommentList struct {
Body []api.PullReviewComment `json:"body"`
}
// Status
// swagger:response Status
// CommitStatus
// swagger:response CommitStatus
type swaggerResponseStatus struct {
// in:body
Body api.Status `json:"body"`
Body api.CommitStatus `json:"body"`
}
// StatusList
// swagger:response StatusList
type swaggerResponseStatusList struct {
// CommitStatusList
// swagger:response CommitStatusList
type swaggerResponseCommitStatusList struct {
// in:body
Body []api.Status `json:"body"`
Body []api.CommitStatus `json:"body"`
}
// WatchInfo
@ -309,3 +309,10 @@ type swaggerLanguageStatistics struct {
// in: body
Body map[string]int64 `json:"body"`
}
// CombinedStatus
// swagger:response CombinedStatus
type swaggerCombinedStatus struct {
// in: body
Body api.CombinedStatus `json:"body"`
}