| 97 | } |
| 98 | |
| 99 | func (r Resolver) ResolveIssue(nodeID, url string, labels []string) IntentRecord { |
| 100 | resolverLog.Printf("ResolveIssue: nodeID=%s labels=%d", nodeID, len(labels)) |
| 101 | if len(labels) == 0 { |
| 102 | resolverLog.Printf("ResolveIssue: no labels for %s, marking unlinked", nodeID) |
| 103 | return r.unlinked("no_supported_intent_source") |
| 104 | } |
| 105 | return IntentRecord{ |
| 106 | Status: r.statusForLabels(labels), |
| 107 | Source: SourceIssueLabels, |
| 108 | RootNodeID: nodeID, |
| 109 | RootType: "issue", |
| 110 | RootURL: url, |
| 111 | Labels: cloneStrings(labels), |
| 112 | Rule: "issue_label_fallback", |
| 113 | ResolverVersion: r.ResolverVersion, |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | func (r Resolver) fromRoot(root RootReference, source AttributionSource, rule string) IntentRecord { |
| 118 | return IntentRecord{ |