MCPcopy Create free account
hub / github.com/git-bug/git-bug / fillTimelineEvents

Method fillTimelineEvents

bridge/github/import_mediator.go:154–176  ·  view source on GitHub ↗
(ctx context.Context, issueNode *issueNode)

Source from the content-addressed store, hash-verified

152}
153
154func (mm *importMediator) fillTimelineEvents(ctx context.Context, issueNode *issueNode) {
155 items := &issueNode.TimelineItems
156 hasItems := true
157 for hasItems {
158 for _, item := range items.Nodes {
159 select {
160 case <-ctx.Done():
161 return
162 case mm.importEvents <- TimelineEvent{issueId: issueNode.issue.Id, timelineItem: item}:
163 }
164 if item.Typename == "IssueComment" {
165 // Issue comments are different than other timeline items in that
166 // they may have associated user content edits.
167 // Right after the comment we send the comment edits.
168 mm.fillCommentEdits(ctx, &item)
169 }
170 }
171 if !items.PageInfo.HasNextPage {
172 break
173 }
174 items, hasItems = mm.queryTimeline(ctx, issueNode.issue.Id, items.PageInfo.EndCursor)
175 }
176}
177
178func (mm *importMediator) queryTimeline(ctx context.Context, nid githubv4.ID, cursor githubv4.String) (*timelineItemsConnection, bool) {
179 vars := newTimelineVars()

Callers 1

fillImportEventsMethod · 0.95

Calls 2

fillCommentEditsMethod · 0.95
queryTimelineMethod · 0.95

Tested by

no test coverage detected