MediaWiki extensions manual
GitHub Commit Lister
Release status: unmaintained
Implementation Tag
Description lists defined count of commit messages of an given repo hosted on github.com
Author(s) Nepomuk Fraedrich
Latest version master (2012-07-08)
MediaWiki 1.11.+
License GNU General Public License 2.0
Example <githubcommit user="nepda" repo="mediawiki-github-commit" offset="0" count="10">
user, repo, offset, count, dateformat
social coding, github

The Extension GitHub Commit Lister tag displays commit messages inside an MediaWiki page. You can define an template var to define the output.

Install edit

// cd /path/to/your/wiki/
cd extensions
git clone https://github.com/nepda/mediawiki-github-commit.git

open LocalSettings.php and add this line somewhere (at the end)


Now you can fetch github-commit messages: (in this example the last 10 committs)

<githubcommit user="nepda" repo="mediawiki-github-commit" offset="0" count="10">

Usage edit

show only the last commit:

<githubcommit user="nepda" repo="mediawiki-github-commit" offset="0" count="1" >

show only 2 commit (without the very last one):

<githubcommit user="nepda" repo="mediawiki-github-commit" offset="1" count="2" >

Modify the date format:

<githubcommit dateformat="Y-m-d H:i:s">

Configuration edit

You can define the output and you can use predefined variables which are replaced by the commit data (list below)

// github-commit.php
// snip ... (~line 70)

$tpl_before = "<ul>";
$tpl = "<li>%commit_committer_date%: %commit_message% <small>by %commit_committer_name%</small> <a href=\"https://github.com/$user/$repo/tree/%commit_sha%\">Tree zeigen</a></li>";
$tpl_after = "</ul>";

// snip ...

List of Vars edit

  • %commit_url%
  • %commit_committer_email%
  • %commit_committer_date%
  • %commit_committer_name%
  • %commit_message%
  • %commit_tree_url%
  • %commit_tree_sha%
  • %commit_sha%
  • %commit_author_email%
  • %commit_author_date%
  • %commit_author_name%