Bug 169707

Summary: Provide bug information when https://webkit.org/b/# URLs are added in comments
Product: WebKit Reporter: Devin Rousso <hi>
Component: WebKit WebsiteAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, buildbot, commit-queue, ddkilzer, joepeck, jond, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
joepeck: review+
Patch
ddkilzer: review+, buildbot: commit-queue-
Archive of layout-test-results from ews124 for ios-simulator-wk2
none
Patch none

Devin Rousso
Reported 2017-03-15 15:39:51 PDT
Bug information (such as if the bug is resolved) is applied to links in comments (usually via strikethroughs) so long as the URL matches the pattern https://bugs.webkit.org/show_bug.cgi?id=# This functionality should be extended to include bug short links, namely https://webkit.org/b/#
Attachments
Patch (1.32 KB, patch)
2017-03-15 16:11 PDT, Devin Rousso
no flags
Patch (1.44 KB, patch)
2017-03-15 19:40 PDT, Devin Rousso
joepeck: review+
Patch (1.36 KB, patch)
2017-05-23 13:44 PDT, Devin Rousso
ddkilzer: review+
buildbot: commit-queue-
Archive of layout-test-results from ews124 for ios-simulator-wk2 (6.71 MB, application/zip)
2017-05-24 12:45 PDT, Build Bot
no flags
Patch (1.43 KB, patch)
2017-05-25 10:29 PDT, Devin Rousso
no flags
Alexey Proskuryakov
Comment 1 2017-03-15 15:54:17 PDT
Adding webkit.org/b would be reasonable. Note that "bug XXX" turns into a link too (and so does "bug XXX comment YYY"). That's the preferred form for it I think.
Devin Rousso
Comment 2 2017-03-15 16:11:42 PDT
Created attachment 304574 [details] Patch I am very inexperienced with Perl, but this is what I was able to figure out. Not sure if it's correct, as I don't know how to test changes to any WebKit site. Any feedback (both for the change and future debugging/testing tips) would be greatly appreciated.
Joseph Pecoraro
Comment 3 2017-03-15 17:25:49 PDT
Comment on attachment 304574 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304574&action=review > Websites/bugs.webkit.org/Bugzilla/Template.pm:213 > + $text =~ s~\b((\Qhttps?://\E)?\Qwebkit.org/b/\E([0-9]+)(\#c([0-9]+))?)\b I think the (\Qhttps?://\E) is wrong. \Q...\E eliminates special character matching, so I would expect this to match the literal "https?://" instead of what it looks like you want which is either "http://" or "https://": http://www.perlmonks.org/bare/?node_id=468052 You probably want: s~\b((https?://)?\Qwebkit.org/b/\E([0-9]+)(\#c([0-9]+))?)\b~ In this case, $1 is still the entire URL, $3 is still the bug#, and $5 is still the comment#. Should be able to test this in JavaScript as such: /\b((https?:\/\/)?webkit\.org\/b\/([0-9]+)(\#c([0-9]+))?)\b/
Devin Rousso
Comment 4 2017-03-15 19:40:21 PDT
Joseph Pecoraro
Comment 5 2017-05-22 21:02:10 PDT
Comment on attachment 304598 [details] Patch This looks good to me. We should rebase this. Sync up with Alexey to ask if there is anything you should do before landing, otherwise this looks good.
Alexey Proskuryakov
Comment 6 2017-05-23 10:27:00 PDT
Yes, please don't land before e-mail discussion is complete.
Devin Rousso
Comment 7 2017-05-23 13:44:49 PDT
Joseph Pecoraro
Comment 8 2017-05-24 11:18:40 PDT
Comment on attachment 311047 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=311047&action=review > Websites/bugs.webkit.org/Bugzilla/Template.pm:214 > + $text =~ s~\b((https?://)?\Qwebkit.org/b/\E([0-9]+)(\#c([0-9]+))?)\b > + ~($things[$count++] = get_bug_link($3, $1, { comment_num => $5, user => $user })) && > + ("\x{FDD2}" . ($count-1) . "\x{FDD3}") > + ~egox; Perhaps this should be wrapped in: #if WEBKIT_CHANGES ... #endif I think ddkilzer knows best here. Otherwise this looks good to me!
Build Bot
Comment 9 2017-05-24 12:45:27 PDT
Comment on attachment 311047 [details] Patch Attachment 311047 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3808275 New failing tests: http/tests/cache/cancel-during-revalidation-succeeded.html fast/css/target-fragment-match.html
Build Bot
Comment 10 2017-05-24 12:45:28 PDT
Created attachment 311145 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
David Kilzer (:ddkilzer)
Comment 11 2017-05-24 13:37:00 PDT
Comment on attachment 311047 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=311047&action=review r=me with adding of a WEBKIT_CHANGES comment. >> Websites/bugs.webkit.org/Bugzilla/Template.pm:214 >> + ~egox; > > Perhaps this should be wrapped in: > > #if WEBKIT_CHANGES > ... > #endif > > I think ddkilzer knows best here. Otherwise this looks good to me! Yes, please add a comment, even if it's just this before the new code: # WEBKIT_CHANGES This type of comment makes a full-tree diff to upstream lets future mergers know this was an intentional change rather than an accident or a merge artifact. Note the "#" in Perl is a comment character so the use of #if/#endif is just gratuitous decoration. :)
Devin Rousso
Comment 12 2017-05-25 10:29:28 PDT
WebKit Commit Bot
Comment 13 2017-05-26 13:59:34 PDT
Comment on attachment 311242 [details] Patch Clearing flags on attachment: 311242 Committed r217504: <http://trac.webkit.org/changeset/217504>
WebKit Commit Bot
Comment 14 2017-05-26 13:59:36 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 15 2017-05-30 20:30:33 PDT
Note You need to log in before you can comment on or make changes to this bug.