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.
()
| 138 | // entry file, when the author left 'issues' empty. Best-effort: on any failure |
| 139 | // Issues stays empty and 'update' then fails via MissingIssues. |
| 140 | func (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. |