Template:Repo link: Difference between revisions

Jump to navigation Jump to search
GitLab zip archive download support implementation and documention. This is now specified through the 'type' parameter being set to 'zip'.
(Added a GitLab example for downloading a zip file archive of a git repository branch. This is not yet functional.)
(GitLab zip archive download support implementation and documention. This is now specified through the 'type' parameter being set to 'zip'.)
Line 188: Line 188:
-->{{#switch: {{{type|git web}}} <!--                              Web interface or base URL. -->
-->{{#switch: {{{type|git web}}} <!--                              Web interface or base URL. -->
     | git = .git<!--                                              Append '.git' for the base repository URL. -->
     | git = .git<!--                                              Append '.git' for the base repository URL. -->
     | git web = <big style="color:red">GitLab web interface not implemented for {{tl|repo link}}</big>
     | git web = <big style="color:red">The GitLab web interface is not implemented for {{tl|repo link}}</big>
    | zip = /repository/archive.zip<!--                            The base zip file URL.
    -->{{#if: {{{commit|{{{tag|{{{branch|}}} }}} }}}
        | &#63;ref={{{commit|{{{tag|{{{branch|}}} }}} }}}<!--      Download for a specific commit, tag, or branch. -->
      }} <!--
    -->{{#if: {{{text|}}}
        | {{{text}}} <!--                                          The text description for the link. -->
        | {{#if: {{{full|}}}
            | <!--                                                No text. -->
            | {{#if: {{{pre|}}}
                | {{{pre}}}<!--                                    A prefix to the link label. -->
                | {{#if: {{{simplepath|}}}
                    | <!--                                        No project, repository or branch. -->
                    | gitlab/<!--                                  Site advertising.
                    -->{{{proj|}}}/<!--                            The project name
                    -->{{{repo|}}}/<!--                            The repository name.
                    -->{{{commit|{{{tag|{{{branch|}}} }}} }}}<!--  The commit, tag, or branch.-->
                  }}
              }} <nowiki></nowiki> zip file<!--                    The link description. -->
          }}
      }}
   }}
   }}
| g
| g
Line 311: Line 331:
; login: The optional user login.
; login: The optional user login.


; type: Choose between git or svn and web interface or direct repository link.  This can be one of '''git''', '''git web''', '''svn''', '''svn web'''.  The default is '''git web'''.
; type: Choose between git or svn and web interface, a direct repository link, or a zip file download.  This can be one of '''git''', '''git web''', '''svn''', '''svn web''', or '''zip'''.  The default is '''git web'''.
: {{inote|Only used for SourceForge repositories.}}
: {{inote|Zip archive downloads are currently only supported for GitLab repositories.}}


; user: The name of the user page for the open source infrastructure.  This is notably different to the '''login''' parameter.  This will generally have precedence over the '''proj''' parameter.  The user page is treated in the same way as a project name.
; user: The name of the user page for the open source infrastructure.  This is notably different to the '''login''' parameter.  This will generally have precedence over the '''proj''' parameter.  The user page is treated in the same way as a project name.
Line 500: Line 520:
==== GitLab <URL> for 'type=git web' ====
==== GitLab <URL> for 'type=git web' ====
This is not implemented yet.  Please add new examples to allow this template to be extended.
This is not implemented yet.  Please add new examples to allow this template to be extended.
==== GitLab <URL> for 'type=zip' ====
For this parameter value, the base zip file URL will be:
<nowiki><protocol>://gitlab.com/<proj>/<repo>/repository/archive.zip</nowiki>
If a branch, tag, or commit is specified, this will be added as a query:
<nowiki><protocol>://gitlab.com/<proj>/<repo>/repository/archive.zip[?ref=<commit|tag|branch>]</nowiki>


==== GitLab URL <TEXT> ====
==== GitLab URL <TEXT> ====
Line 1,210: Line 1,237:


  {{obr}}repo link
  {{obr}}repo link
  {{!}} site     = gitlab
  {{!}} site   = gitlab
  {{!}} proj     = extra500
  {{!}} proj   = extra500
  {{!}} repo     = extra500
  {{!}} repo   = extra500
  {{!}} download = zip
  {{!}} branch = FG/2016.1
  {{!}} full     = 1
{{!}} type  = zip
  {{!}} full   = 1
  {{cbr}}
  {{cbr}}


{{repo link
{{repo link
  | site     = gitlab
| site   = gitlab
  | proj     = extra500
| proj   = extra500
  | repo     = extra500
| repo   = extra500
   | download = zip
| branch = FG/2016.1
  | full     = 1
| type   = zip
| full   = 1
}}
}}


Navigation menu