Merge "Add commit-filter for cgit"

This commit is contained in:
Jenkins 2013-08-28 21:40:38 +00:00 committed by Gerrit Code Review
commit 41bff34c27
3 changed files with 18 additions and 0 deletions

View File

@ -17,6 +17,9 @@ cache-root-ttl=1
# Specify some default clone prefixes
clone-prefix=git://git.openstack.org https://git.openstack.org
# Specify a command which will be invoked to format commit messages
commit-filter=/usr/local/bin/commit-filter.sh
# Specify the css url
css=/static/openstack.css

View File

@ -0,0 +1,8 @@
#!/bin/sh
sed -re '
s`(I[0-9a-f]{8,40})`<a href="https://review.openstack.org/\#q,\1,n,z">\0</a>`g
s`\b([0-9a-fA-F]{8,40})\b`<a href="./?id=\1">\0</a>`g
s`(\b[Bb]ug\b|\b[Ll][Pp]\b)[ \t#:]*([0-9]+)`<a href="https://code.launchpad.net/bugs/\2">\0</a>`g
s`(\b[Bb]lue[Pp]rint\b|\b[Bb][Pp]\b)[ \t#:]*([A-Za-z0-9\.-]+)`<a href="https://blueprints.launchpad.net/openstack/?searchtext=\2">\0</a>`g
'

View File

@ -127,4 +127,11 @@ class openstack_project::git_backend (
require => File['/var/www/cgit/static'],
}
file { '/usr/local/bin/commit-filter.sh':
ensure => present,
owner => 'root',
group => 'root',
mode => '0755',
source => 'puppet:///modules/openstack_project/git/commit-filter.sh',
}
}