1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add API to get issue/pull comments and events (timeline) (#17403)

* Add API to get issue/pull comments and events (timeline)
Adds an API to get both comments and events in one endpoint with all required data.
Closes go-gitea/gitea#13250

* Fix swagger

* Don't show code comments (use review api instead)

* fmt

* Fix comment

* Time -> TrackedTime

* Use var directly

* Add logger

* Fix lint

* Fix test

* Add comments

* fmt

* [test] get issue directly by ID

* Update test

* Add description for changed refs

* Fix build issues + lint

* Fix build

* Use string enums

* Update swagger

* Support `page` and `limit` params

* fmt + swagger

* Use global slices

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
qwerty287
2022-01-01 15:12:25 +01:00
committed by GitHub
parent 549fd03c0e
commit 7db2f110ad
9 changed files with 577 additions and 0 deletions

View File

@@ -36,6 +36,13 @@ type swaggerResponseCommentList struct {
Body []api.Comment `json:"body"`
}
// TimelineList
// swagger:response TimelineList
type swaggerResponseTimelineList struct {
// in:body
Body []api.TimelineComment `json:"body"`
}
// Label
// swagger:response Label
type swaggerResponseLabel struct {