Merge "Add commit-filter for cgit"
This commit is contained in:
commit
41bff34c27
modules/openstack_project
@ -17,6 +17,9 @@ cache-root-ttl=1
|
|||||||
# Specify some default clone prefixes
|
# Specify some default clone prefixes
|
||||||
clone-prefix=git://git.openstack.org https://git.openstack.org
|
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
|
# Specify the css url
|
||||||
css=/static/openstack.css
|
css=/static/openstack.css
|
||||||
|
|
||||||
|
8
modules/openstack_project/files/git/commit-filter.sh
Normal file
8
modules/openstack_project/files/git/commit-filter.sh
Normal 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
|
||||||
|
'
|
@ -127,4 +127,11 @@ class openstack_project::git_backend (
|
|||||||
require => File['/var/www/cgit/static'],
|
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',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user