mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +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:
		| @@ -49,6 +49,13 @@ var ( | ||||
| 	giteaHostInit         sync.Once | ||||
| 	giteaHost             string | ||||
| 	giteaIssuePullPattern *regexp.Regexp | ||||
|  | ||||
| 	actionStrings = []string{ | ||||
| 		"none", | ||||
| 		"closes", | ||||
| 		"reopens", | ||||
| 		"neutered", | ||||
| 	} | ||||
| ) | ||||
|  | ||||
| // XRefAction represents the kind of effect a cross reference has once is resolved | ||||
| @@ -65,6 +72,10 @@ const ( | ||||
| 	XRefActionNeutered // 3 | ||||
| ) | ||||
|  | ||||
| func (a XRefAction) String() string { | ||||
| 	return actionStrings[a] | ||||
| } | ||||
|  | ||||
| // IssueReference contains an unverified cross-reference to a local issue or pull request | ||||
| type IssueReference struct { | ||||
| 	Index   int64 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user