Difference between revisions of "Template:Pr"

From AlliedModders Wiki
Jump to: navigation, search
(Removed trailing slash from links.)
(Added support for any project while keeping sourcemod as default)
 
Line 1: Line 1:
[https://github.com/alliedmodders/sourcemod/pull/{{{1}}} PR {{{1}}}]
+
<includeonly>{{#if: {{{2|}}}
 +
    | [https://github.com/alliedmodders/{{#switch: {{{1}}}
 +
        | amxx = amxmodx
 +
        | amb  = ambuild
 +
        | mm  = metamod-hl1
 +
        | mms  = metamod-source
 +
        | sm  = sourcemod
 +
        | sp  = sourcepawn
 +
        | {{{1}}} }}/pull/{{{2}}} PR {{{2}}}]
 +
 
 +
    | [https://github.com/alliedmodders/sourcemod/pull/{{{1}}} PR {{{1}}}]
 +
}}</includeonly><noinclude>
 +
This template can be used to generate a link to a specific project's Pull Request: <code><nowiki>https://github.com/alliedmodders/{project}/pull/{number}</nowiki></code>
 +
== Usage ==
 +
 
 +
=== Syntax===
 +
{|
 +
|SourceMod only
 +
|<code><nowiki>{{PR|number}}</nowiki></code>
 +
|- style="vertical-align:top;"
 +
|Others project
 +
|<code><nowiki>{{PR|project|number}}</nowiki></code><br />
 +
* ''project'' can be anything
 +
* There are few shortcuts linked to main projects:
 +
:{|
 +
|<code>amxx</code> || amxmodx
 +
|-
 +
|<code>amb</code>  || ambuild
 +
|-
 +
|<code>mm</code>  || metamod-hl1
 +
|-
 +
|<code>mms</code>  || metamod-source
 +
|-
 +
|<code>sp</code>  || sourcepawn
 +
|-
 +
|<code>sm</code>  || sourcemod
 +
|}
 +
|}
 +
 
 +
=== Example ===
 +
{| class="wikitable"
 +
! style="padding: 10px;" | You type
 +
! style="padding: 10px;" | You get
 +
|-
 +
| style="padding: 10px;" | <code><nowiki>{{PR|42}}</nowiki></code>
 +
| style="padding: 10px;" | {{PR|42}}
 +
|-
 +
| style="padding: 10px;" | <code><nowiki>{{PR|amxx|42}}</nowiki></code>
 +
| style="padding: 10px;" | {{PR|amxx|42}}
 +
|}
 +
</noinclude>

Latest revision as of 09:25, 16 January 2017

This template can be used to generate a link to a specific project's Pull Request: https://github.com/alliedmodders/{project}/pull/{number}

Usage

Syntax

SourceMod only {{PR|number}}
Others project {{PR|project|number}}
  • project can be anything
  • There are few shortcuts linked to main projects:
amxx amxmodx
amb ambuild
mm metamod-hl1
mms metamod-source
sp sourcepawn
sm sourcemod

Example

You type You get
{{PR|42}} PR 42
{{PR|amxx|42}} PR 42