mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	issues comment API : list, create, edit (#2966)
add `since` query string support to list issue comment
This commit is contained in:
		@@ -11,6 +11,7 @@ import (
 | 
			
		||||
 | 
			
		||||
	"github.com/Unknwon/com"
 | 
			
		||||
	"github.com/go-xorm/xorm"
 | 
			
		||||
	api "github.com/gogits/go-gogs-client"
 | 
			
		||||
 | 
			
		||||
	"github.com/gogits/gogs/modules/log"
 | 
			
		||||
	"github.com/gogits/gogs/modules/markdown"
 | 
			
		||||
@@ -104,6 +105,18 @@ func (c *Comment) AfterDelete() {
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// APIFormat convert Comment struct to api.Comment struct
 | 
			
		||||
func (c *Comment) APIFormat() *api.Comment {
 | 
			
		||||
	apiComment := &api.Comment{
 | 
			
		||||
		ID:      c.ID,
 | 
			
		||||
		Poster:  c.Poster.APIFormat(),
 | 
			
		||||
		Body:    c.Content,
 | 
			
		||||
		Created: c.Created,
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return apiComment
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// HashTag returns unique hash tag for comment.
 | 
			
		||||
func (c *Comment) HashTag() string {
 | 
			
		||||
	return "issuecomment-" + com.ToStr(c.ID)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user