MCPcopy Index your code
hub / github.com/git-bug/git-bug / fillIssueEditEvents

Method fillIssueEditEvents

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

Source from the content-addressed store, hash-verified

108}
109
110func (mm *importMediator) fillIssueEditEvents(ctx context.Context, issueNode *issueNode) {
111 edits := &issueNode.UserContentEdits
112 hasEdits := true
113 for hasEdits {
114 for edit := range reverse(edits.Nodes) {
115 if edit.Diff == nil || string(*edit.Diff) == "" {
116 // issueEdit.Diff == nil happen if the event is older than early
117 // 2018, Github doesn't have the data before that. Best we can do is
118 // to ignore the event.
119 continue
120 }
121 select {
122 case <-ctx.Done():
123 return
124 case mm.importEvents <- IssueEditEvent{issueId: issueNode.issue.Id, userContentEdit: edit}:
125 }
126 }
127 if !edits.PageInfo.HasPreviousPage {
128 break
129 }
130 edits, hasEdits = mm.queryIssueEdits(ctx, issueNode.issue.Id, edits.PageInfo.EndCursor)
131 }
132}
133
134func (mm *importMediator) queryIssueEdits(ctx context.Context, nid githubv4.ID, cursor githubv4.String) (*userContentEditConnection, bool) {
135 vars := newIssueEditVars()

Callers 1

fillImportEventsMethod · 0.95

Calls 2

queryIssueEditsMethod · 0.95
reverseFunction · 0.85

Tested by

no test coverage detected