Bug 246692

Summary: REGRESSION: [bugs.webkit.org] Linkified commit identifiers don't go to specific commit
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: Tools / TestsAssignee: lingho <lingho>
Status: RESOLVED FIXED    
Severity: Normal CC: lingho, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

Description Ryan Haddad 2022-10-18 09:18:17 PDT
Linkified commit identifiers in bugzilla (e.g. 255564@main) don't direct you to a page like https://commits.webkit.org/255564@main, but rather https://github.com/WebKit/WebKit/commits

Unsure if this was caused by https://commits.webkit.org/255564@main, it definitely started recently.
Comment 1 Radar WebKit Bug Importer 2022-10-18 10:16:03 PDT
<rdar://problem/101297471>
Comment 2 lingho@apple.com 2022-10-18 10:18:37 PDT
Displayed text link uses matched group 1 while generate link uses matched group 2 due to another regex handing trac.webkit.org link.

sub _replace_reference {
    my $args = shift;
    my $text = $args->{matches}->[0];
    my $reference = $args->{matches}->[1];
    return qq{<a href="https://commits.webkit.org/$reference">$text</a>};
};

My last patch left out a parentesis pair causing group 2 to be NULL.
Comment 3 lingho@apple.com 2022-10-18 10:21:55 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5349
Comment 4 lingho@apple.com 2022-10-18 10:30:13 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5500
Comment 5 EWS 2022-10-19 08:13:17 PDT
Committed 255732@main (3f0b2fe64691): <https://commits.webkit.org/255732@main>

Reviewed commits have been landed. Closing PR #5500 and removing active labels.