Project

General

Profile

Feature #6771

Report username is subject of commit messages

Added by Kanika Sachdev over 5 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/10/2014
Due date:
% Done:

0%

Estimated time:
Duration:

Description

Would it be possible to report the username of the person making the commit in the subject line of the commit mails? Currently only the revision number and directory that is changed are reported. I speak of SVN since that's what NOvA uses.

Thanks!
Kanika

History

#1 Updated by Marc Mengel over 5 years ago

There are a couple of ways to deal with this. Currently your
commit-hook runs:

REPOS="$1" 
REV="$2" 

/usr/local/bin/commit-email.pl "$REPOS" "$REV" --from p-novaart@cdcvs.fnal.gov -h fnal.gov --diff y NOVASVNCOMMIT@fnal.gov 

1) If you simply remove the '--from ' bit, the From address will become
the .
2) you could add/change a few lines:

REPOS="$1" 
REV="$2" 
AUTHOR=`svn log -r $REV file://$REPOS| grep "^r$REV" | cut -d '|' -f 2`

/usr/local/bin/commit-email.pl "$REPOS" "$REV" -s "commit: $AUTHOR $REPOS" --from p-novaart@cdcvs.fnal.gov -h fnal.gov --diff y NOVASVNCOMMIT@fnal.gov 

and you would then have the author in the subject line, as requested.



Also available in: Atom PDF