@@ -212,20 +212,35 @@ export class GlCommitDetails extends GlDetailsBase {
212
212
| { type : 'pr' ; value : Serialized < PullRequestShape > }
213
213
> ( ) ;
214
214
215
+ const autolinkIdsByUrl = new Map < string , string > ( ) ;
216
+
215
217
if ( this . state ?. commit ?. autolinks != null ) {
216
218
for ( const autolink of this . state . commit . autolinks ) {
217
219
deduped . set ( autolink . id , { type : 'autolink' , value : autolink } ) ;
220
+ autolinkIdsByUrl . set ( autolink . url , autolink . id ) ;
218
221
}
219
222
}
220
223
221
224
if ( this . state ?. autolinkedIssues != null ) {
222
225
for ( const issue of this . state . autolinkedIssues ) {
223
226
deduped . set ( issue . id , { type : 'issue' , value : issue } ) ;
227
+ if ( issue . url != null ) {
228
+ const autoLinkId = autolinkIdsByUrl . get ( issue . url ) ;
229
+ if ( autoLinkId != null ) {
230
+ deduped . delete ( autoLinkId ) ;
231
+ }
232
+ }
224
233
}
225
234
}
226
235
227
236
if ( this . state ?. pullRequest != null ) {
228
237
deduped . set ( this . state . pullRequest . id , { type : 'pr' , value : this . state . pullRequest } ) ;
238
+ if ( this . state . pullRequest . url != null ) {
239
+ const autoLinkId = autolinkIdsByUrl . get ( this . state . pullRequest . url ) ;
240
+ if ( autoLinkId != null ) {
241
+ deduped . delete ( autoLinkId ) ;
242
+ }
243
+ }
229
244
}
230
245
231
246
const autolinks : Serialized < Autolink > [ ] = [ ] ;
0 commit comments