Difference between revisions of "Template:Git file"

160 bytes added ,  16:06, 4 August 2015
First step of migration to Phabricator Diffusion, per phabricator:T101358.
>Krinkle
(Fix broken urls. Slash must be encoded otherwise it tries to open the first part of the url instead of the actual fil epath)
>Nemo bis
(First step of migration to Phabricator Diffusion, per phabricator:T101358.)
Line 1: Line 1:
[https://git.wikimedia.org/{{#if:{{{action|}}}
[https://phabricator.wikimedia.org/diffusion/{{#invoke:callsigns|repoToCallsign|{{{project|mediawiki/core}}}}}/{{#if:{{{action|}}}
   |{{{action}}}
   |{{#ifeq:{{{action|}}}|raw|browse|{{{action}}}}}
   |blob
   |browse
}}/{{urlencode:{{{project|mediawiki/core}}}}}.git/{{#if:{{{branch|}}}
}}/{{#if:{{{branch|}}}
  |{{{branch}}}
  |{{#ifeq:{{{branch|}}}|HEAD|master|{{{branch}}}}}
   |HEAD
   |master
}}/{{urlencode:{{{file|}}}}}{{#if:{{{line|}}}
}}/{{{file|}}}{{#if:{{{line|}}}
   |#L{{{line}}}
   |${{{line}}}
}}{{#ifeq:{{{action|}}}|raw
  |?view=raw
  |
}} {{#if:{{{text|}}}
}} {{#if:{{{text|}}}
   |{{{text}}}
   |{{{text}}}
Line 18: Line 21:
<small>Maintenance:
<small>Maintenance:
[[Special:WhatLinksHere/Template:Git file/blob_plain|blob_plain]],
[[Special:WhatLinksHere/Template:Git file/blob_plain|blob_plain]],
[[Special:WhatLinksHere/Template:Git file/shortlog|shortlog]]</small>
[[Special:WhatLinksHere/Template:Git file/shortlog|shortlog]], [[Module:Callsigns]]</small>
{{Category|Link templates}}
{{Category|Link templates}}
{{Category|External link templates}}
{{Category|External link templates}}
</noinclude>
</noinclude>
Anonymous user