瀏覽代碼

feat: add discussion url

xiaobing.wang 1 年之前
父節點
當前提交
7581d2acdb
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      backend/internal/service/github.go

+ 2 - 0
backend/internal/service/github.go

@@ -37,6 +37,7 @@ type Issue struct {
 // Discussion represents a GitHub discussion.
 type Discussion struct {
 	ID            string   `json:"id"`
+	Url           string   `json:"url"`
 	Title         string   `json:"title"`
 	BodyText      string   `json:"-"`
 	Labels        []Label  `json:"labels"`
@@ -334,6 +335,7 @@ func (s *GitHubService) fetchDiscussions(ctx context.Context, afterCursor *githu
 	for _, node := range query.Repository.Discussions.Nodes {
 		discussion := &Discussion{
 			ID:       node.ID,
+			Url:      node.Url,
 			Title:    node.Title,
 			BodyText: node.BodyText,
 		}