Open main menu

Changes

Template:Github url

5,628 bytes added, 09:04, 26 October 2017
Creation of the {{gitlab url}} template by copying {{github source}}.
{{repo link
| site = github
| cmd{{#if:{{{cmd|}}}||NULL}} = {{{cmd}}}
| opt{{#if:{{{opt|}}}||NULL}} = {{{opt}}}
| protocol = https
| type{{#if:{{{type|}}}||NULL}} = {{{type}}}
| user{{#if:{{{user|{{{u|}}}}}}||NULL}} = {{{user|{{{u}}}}}}
| proj{{#if:{{{proj|{{{p|{{{1|}}}}}}}}}||NULL}} = {{{proj|{{{p|{{{1}}}}}}}}}
| repo{{#if:{{{repo|{{{r|{{{2|}}}}}}}}}||NULL}} = {{{repo|{{{r|{{{2}}}}}}}}}
| branch{{#if:{{{branch|{{{b|{{{3|}}}}}}}}}||NULL}} = {{{branch|{{{b|{{{3}}}}}}}}}
| tag{{#if:{{{tag|{{{t|}}}}}}||NULL}} = {{{tag|{{{t}}}}}}
| path{{#if:{{{path|{{{f|{{{4|}}}}}}}}}||NULL}} = {{{path|{{{f|{{{4}}}}}}}}}
| commit{{#if:{{{commit|{{{c|{{{5|}}}}}}}}}||NULL}} = {{{commit|{{{c|{{{5}}}}}}}}}
| line{{#if:{{{line|{{{l|}}}}}}||NULL}} = {{{line|{{{l}}}}}}
| view{{#if:{{{view|{{{v|}}}}}}||NULL}} = {{{view|{{{v}}}}}}
| post{{#if:{{{post|}}}||NULL}} = {{{post}}}
| full = 1
}}<noinclude>

{{repo link/doc infrastructure url
| label = GitHub
| site = github
| user = 1
| gh = 1
| git = 1
| examples =
=== Base site URL ===
This is for the GitHub website when no parameters are supplied.

{{obr}}github url{{cbr}}.

{{github url}}.

=== Project given ===
{{obr}}github url{{!}}nmr-relax{{!}}website{{cbr}}
{{github url|nmr-relax|website}}

=== The source repository ===
This is a link to https://github.com/nmr-relax/relax/tree/master.

{{obr}}github url
{{!}} proj = nmr-relax
{{!}} repo = relax
{{!}} branch = master
{{cbr}}.

{{github url
| proj = nmr-relax
| repo = relax
| branch = master
}}.

=== File with line number ===
This is a link to https://github.com/nmr-relax/relax/tree/master/gui/spin_viewer/tree.py#L68.

{{obr}}github url
{{!}} proj = nmr-relax
{{!}} repo = relax
{{!}} path = gui/spin_viewer/tree.py
{{!}} line = 68
{{cbr}}.

{{github url
| proj = nmr-relax
| repo = relax
| path = gui/spin_viewer/tree.py
| line = 68
}}.

=== Branch ===
This is a link to https://github.com/nmr-relax/relax/tree/j_couplings.

{{obr}}github url
{{!}} proj = nmr-relax
{{!}} repo = relax
{{!}} branch = j_couplings
{{cbr}}.

{{github url
| proj = nmr-relax
| repo = relax
| branch = j_couplings
}}.

=== Tag ===
This is a link to https://github.com/nmr-relax/relax/tree/4.0.3.

{{obr}}github url
{{!}} proj = nmr-relax
{{!}} repo = relax
{{!}} tag = 4.0.3
{{cbr}}.

{{github url
| proj = nmr-relax
| repo = relax
| tag = 4.0.3
}}.

=== Tag, history view ===
This is a link to https://github.com/nmr-relax/relax/commits/4.0.3.

{{obr}}github url
{{!}} proj = nmr-relax
{{!}} repo = relax
{{!}} tag = 4.0.3
{{!}} view = commits
{{cbr}}.

{{github url
| proj = nmr-relax
| repo = relax
| tag = 4.0.3
| view = commits
}}.

=== Commit ===
{{note|For a simpler interface for this specific example, see {{tl|relax commit}}.}}
This is a link to https://github.com/nmr-relax/relax/commit/bb91d693f4102f81735e2a965cc1eed610211753.

{{obr}}github url
{{!}} proj = nmr-relax
{{!}} repo = relax
{{!}} commit = bb91d693f4102f81735e2a965cc1eed610211753
{{!}} view = commit
{{cbr}}.

{{github url
| proj = nmr-relax
| repo = relax
| commit = bb91d693f4102f81735e2a965cc1eed610211753
| view = commit
}}.

=== Commit, history view ===
This is a link to https://github.com/nmr-relax/relax/commits/6105c8.

{{obr}}github url
{{!}} proj = nmr-relax
{{!}} repo = relax
{{!}} commit = 6105c8
{{!}} view = commits
{{cbr}}.

{{github url
| proj = nmr-relax
| repo = relax
| commit = 6105c8
| view = commits
}}.

=== Repository clone ===
{{note|For a simpler interface for this specific example, see {{tl|github clone}} and {{tl|relax clone}}.}}
This is for <code><nowiki>git clone https://github.com/nmr-relax/relax.git relax</nowiki></code>.

{{obr}}#tag:code{{!}}{{obr}}#tag:nowiki{{!}}{{obr}}github url
{{!}} cmd = git clone
{{!}} protocol = git
{{!}} type = git
{{!}} proj = nmr-relax
{{!}} repo = relax
{{!}} post = relax
{{!}} full = 1
{{cbr}}{{cbr}}{{cbr}}.

{{#tag:code|{{#tag:nowiki|{{github url
| cmd = git clone
| protocol = git
| type = git
| proj = nmr-relax
| repo = relax
| post = relax
| full = 1
}}}}}}.

Or as plain text:

{{obr}}#tag:nowiki{{!}}{{obr}}github url
{{!}} cmd = git clone
{{!}} protocol = git
{{!}} type = git
{{!}} proj = nmr-relax
{{!}} repo = relax
{{!}} post = relax
{{!}} full = 1
{{cbr}}{{cbr}}.

{{#tag:nowiki|{{github url
| cmd = git clone
| protocol = git
| type = git
| proj = nmr-relax
| repo = relax
| post = relax
| full = 1
}}}}.

=== Aliased parameters ===
This is a link to https://github.com/nmr-relax/relax/tree/j_couplings/generic_fns/align_tensor.py#L68.

{{obr}}github url
{{!}} p = nmr-relax
{{!}} r = relax
{{!}} b = j_couplings
{{!}} f = generic_fns/align_tensor.py
{{!}} l = 68
{{cbr}}.

{{github url
| p = nmr-relax
| r = relax
| b = j_couplings
| f = generic_fns/align_tensor.py
| l = 68
}}.

=== Numbered parameters ===
This is a link to https://github.com/nmr-relax/relax/tree/j_couplings/generic_fns/align_tensor.py#L68.

{{obr}}github url {{!}} nmr-relax {{!}} relax {{!}} j_couplings {{!}} generic_fns/align_tensor.py {{!}} l=68 {{cbr}}.

{{github url | nmr-relax | relax | j_couplings | generic_fns/align_tensor.py | l=68 }}.

}}</noinclude>
Trusted, Bureaucrats
4,228

edits