File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed
Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -347,13 +347,23 @@ BLOCK renderDiffUri;
347347 url = res.0;
348348 branch = res.1;
349349 IF bi1.type == "hg" || bi1.type == "git" %]
350- <a target="_blank" [% HTML.attributes(href => c.uri_for('/api/scmdiff', {
351- uri = url,
352- rev1 = bi1.revision,
353- rev2 = bi2.revision,
354- type = bi1.type,
355- branch = branch
356- })) %]>[% HTML.escape(contents) %]</a>
350+ [% IF url.substr(0, 19) == "https://github.com/" %]
351+ <a target="_blank" [% HTML.attributes(href =>
352+ url
353+ _ "/compare/"
354+ _ bi1.revision
355+ _ "..."
356+ _ bi2.revision,
357+ ) %]>[% HTML.escape(contents) %]</a>
358+ [% ELSE %]
359+ <a target="_blank" [% HTML.attributes(href => c.uri_for('/api/scmdiff', {
360+ uri = url,
361+ rev1 = bi1.revision,
362+ rev2 = bi2.revision,
363+ type = bi1.type,
364+ branch = branch
365+ })) %]>[% HTML.escape(contents) %]</a>
366+ [% END %]
357367 [% ELSE;
358368 contents;
359369 END;
You can’t perform that action at this time.
0 commit comments