Template:Github/doc

This template provides an alternative to git file for linking to source code.

This uses the GitHub mirror instead of Diffusion the Gitblit server at git.wikimedia.org (WMF is deprecating gitblit and git.wikimedia.org in 2015). Editors may find GitHub's interface more user-friendly, faster responding, visually appealing, or otherwise preferable. Compare:

Usage
Basic produces:

Action

produces:

Line number produces:

{	"params": { "repo": { "description": "Full repository name (e.g. \"mediawiki\" or \"mediawiki/extensions/EventLogging\"). Must not include any \".git\" suffix.", "type": "string", "default": "mediawiki" },		"action": { "description": "A GitHub repo action. One of \"blob\", \"raw\", \"blame\", \"commits\", or \"tree\"", "type": "string", "default": "blob" },		"branch": { "type": "string", "default": "master" },		"file": { "type": "string", "default": "", "required": true },		"line": { "type": "number" },		"text": { "description": "Custom label for the link created by this template.", "type": "string", "default": "The file path" }	},	"description": "A convenient way of linking to source code.", "paramOrder": [ "repo", "action", "branch", "file", "line", "text" ] }