Template:Repo link: Difference between revisions

Jump to navigation Jump to search
GitLab support for: the 'user' parameter, basic 'git web' URLs (no paths, commits, branches, merge requests, etc.), and basic link text construction.
(The default Gitorious view when only a branch is specified is now 'shortlog' rather than 'summary'.)
(GitLab support for: the 'user' parameter, basic 'git web' URLs (no paths, commits, branches, merge requests, etc.), and basic link text construction.)
Line 268: Line 268:
-->{{{protocol|https}}}://<!--                                      URL protocol (default = https).
-->{{{protocol|https}}}://<!--                                      URL protocol (default = https).
-->gitlab.com/<!--                                                  The URL.
-->gitlab.com/<!--                                                  The URL.
-->{{{proj|flightgear}}}<!--                                       The project (default = flightgear).
-->{{#if: {{{user|}}} <!--                                         Project or user? -->
-->{{#if: {{{repo|}}} | /{{{repo}}} }}<!--                         The version control repository.
    | {{{user}}}
    | {{{proj|}}}
  }}/<!--
-->{{{repo|}}}/<!--                                                 The version control repository.
-->{{#switch: {{{type|git web}}} <!--                              Web interface or base URL. -->
-->{{#switch: {{{type|git web}}} <!--                              Web interface or base URL. -->
     | git = .git<!--                                              Append '.git' to the base repository URL. -->
     | git = .git<!--                                              Append '.git' to the base repository URL. -->
     | git web = <big style="color:red">The GitLab web interface is not yet implemented in {{tl|repo link}}</big>
     | git web = <!--                                              TODO: The rest of the URL
  --><nowiki></nowiki> {{#if: {{{text|}}}
      | {{{text}}}<!--                                            The text description for the link. -->
      | {{#ifeq: {{{full|}}} | 1
          | <!--                                                  No text. -->
          | {{#if: {{{pre|}}}
              | {{{pre}}}<!--                                      A prefix to the link label. -->
              | {{#if: {{{simplepath|}}}
                  | <!--                                          No project, repository or branch. -->
                  | gitlab/<!--                                    Site advertising.
                  -->{{{user|{{{proj|}}}}}}/<!--                    The user or project name.
                  -->{{{repo|}}}/<!--                              The repository name.
                  -->{{{commit|{{{tag|{{{branch|}}} }}} }}}<!--    The commit, tag, or branch.-->
                }}
            }}
        }}
    }}
     | zip = /repository/archive.zip<!--                            The base zip file URL.
     | zip = /repository/archive.zip<!--                            The base zip file URL.
     -->{{#if: {{{commit|{{{tag|{{{branch|}}} }}} }}}
     -->{{#if: {{{commit|{{{tag|{{{branch|}}} }}} }}}

Navigation menu