Commit bd87dc6b authored by Robert Ricci's avatar Robert Ricci

Add a 'gitlaburl' parameter, works like 'gitweburl'

parent 0342a293
......@@ -270,6 +270,13 @@ my $max_patches = get_config("maxpatches",20);
#
my $gitweb_url = get_config("gitweburl",undef);
#
# URL for a gitlab server for this repository. If set, links will
# be sent for each commit pointing to the entry on gitlab
# For example: https://gitlab.flux.utah.edu/emulab/emulab-devel
#
my $gitlab_url = get_config("gitlaburl",undef);
#
# If true, include clone URLs in the mail. These will be guessed from
# the local hostname and the path
......@@ -947,6 +954,13 @@ sub commit_mail($$$\@$@) {
push @commit_text, "\n${gitweb_url};a=commitdiff;h=$shortrev\n";
}
#
# Similar thing, but for gitlab
#
if (defined($gitlab_url)) {
my $shortrev = short_hash($rev);
push @commit_text, "\n${gitlab_url}/commit/$shortrev\n";
}
#
# Grab patches - we do this seperately so that we can put them down
# below the commit logs. (Note: we don't print patches when a ref is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment