1 package Gitolite
::Triggers
::RedmineUserAlias
;
5 use Gitolite
::Conf
::Load
;
10 # aliasing a redmine username to a more user-friendly one
11 # ----------------------------------------------------------------------
17 Redmine creates users like "redmine_alice_123"; we want the users to just
18 see "alice" instead of that.
22 * Redmine does not allow duplicates in the middle bit; i.e., you can't
23 create redmine_alice_123 and redmine_alice_456 also.
27 * add this code as lib/Gitolite/Triggers/RedmineUserAlias.pm to your
28 site-local code directory; see this link for how:
30 http://gitolite.com/gitolite/non-core.html#locations
32 * add the following to the rc file, just before the ENABLE section (don't
33 forget the trailing comma):
35 INPUT => [ 'RedmineUserAlias::input' ],
39 * http mode has not been tested and will not be. If someone has the time to
40 test it and make it work please let me know.
42 * not tested with mirroring.
46 * "All that for what is effectively one line of code. I need a life".
51 $ARGV[0] or _die
"no username???";
52 $ARGV[0] =~ s/^redmine_(\S+)_\d+$/$1/;