Skip to content

Commit

Permalink
Fixes #3940 autolinks can disappear after enrichment
Browse files Browse the repository at this point in the history
  • Loading branch information
d13 committed Jan 31, 2025
1 parent c1e8b95 commit 06f8cf2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,24 +223,24 @@ export class GlCommitDetails extends GlDetailsBase {

if (this.state?.autolinkedIssues != null) {
for (const issue of this.state.autolinkedIssues) {
deduped.set(issue.id, { type: 'issue', value: issue });
if (issue.url != null) {
const autoLinkId = autolinkIdsByUrl.get(issue.url);
if (autoLinkId != null) {
deduped.delete(autoLinkId);
}
}
deduped.set(issue.id, { type: 'issue', value: issue });
}
}

if (this.state?.pullRequest != null) {
deduped.set(this.state.pullRequest.id, { type: 'pr', value: this.state.pullRequest });
if (this.state.pullRequest.url != null) {
const autoLinkId = autolinkIdsByUrl.get(this.state.pullRequest.url);
if (autoLinkId != null) {
deduped.delete(autoLinkId);
}
}
deduped.set(this.state.pullRequest.id, { type: 'pr', value: this.state.pullRequest });
}

const autolinks: Serialized<Autolink>[] = [];
Expand Down

0 comments on commit 06f8cf2

Please sign in to comment.