MCPcopy
hub / github.com/grafana/tempo / BackfillIssues

Method BackfillIssues

tools/chloggen/internal/chlog/entry.go:140–147  ·  view source on GitHub ↗

BackfillIssues fills Issues from the PR number in the commit that added the entry file, when the author left 'issues' empty. Best-effort: on any failure Issues stays empty and 'update' then fails via MissingIssues.

()

Source from the content-addressed store, hash-verified

138// entry file, when the author left 'issues' empty. Best-effort: on any failure
139// Issues stays empty and 'update' then fails via MissingIssues.
140func (e *Entry) BackfillIssues() {
141 if len(e.Issues) > 0 || e.path == "" {
142 return
143 }
144 if pr, ok := prFromGitHistory(e.path); ok {
145 e.Issues = []int{pr}
146 }
147}
148
149// MissingIssues returns the de-duplicated source paths of entries that still
150// have no 'issues' after backfill.

Callers 2

TestBackfillIssuesFunction · 0.95
updateCmdFunction · 0.80

Calls 1

prFromGitHistoryFunction · 0.85

Tested by 1

TestBackfillIssuesFunction · 0.76