Skip to content

Commit 06f8cf2

Browse files
committed
Fixes #3940 autolinks can disappear after enrichment
1 parent c1e8b95 commit 06f8cf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/webviews/apps/commitDetails/components/gl-commit-details.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,24 +223,24 @@ export class GlCommitDetails extends GlDetailsBase {
223223

224224
if (this.state?.autolinkedIssues != null) {
225225
for (const issue of this.state.autolinkedIssues) {
226-
deduped.set(issue.id, { type: 'issue', value: issue });
227226
if (issue.url != null) {
228227
const autoLinkId = autolinkIdsByUrl.get(issue.url);
229228
if (autoLinkId != null) {
230229
deduped.delete(autoLinkId);
231230
}
232231
}
232+
deduped.set(issue.id, { type: 'issue', value: issue });
233233
}
234234
}
235235

236236
if (this.state?.pullRequest != null) {
237-
deduped.set(this.state.pullRequest.id, { type: 'pr', value: this.state.pullRequest });
238237
if (this.state.pullRequest.url != null) {
239238
const autoLinkId = autolinkIdsByUrl.get(this.state.pullRequest.url);
240239
if (autoLinkId != null) {
241240
deduped.delete(autoLinkId);
242241
}
243242
}
243+
deduped.set(this.state.pullRequest.id, { type: 'pr', value: this.state.pullRequest });
244244
}
245245

246246
const autolinks: Serialized<Autolink>[] = [];

0 commit comments

Comments
 (0)