diff options
Diffstat (limited to 'modules/subversion/templates/nonmaintainer_notify.sh')
| -rw-r--r-- | modules/subversion/templates/nonmaintainer_notify.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/subversion/templates/nonmaintainer_notify.sh b/modules/subversion/templates/nonmaintainer_notify.sh index e98d44be..00db7dc4 100644 --- a/modules/subversion/templates/nonmaintainer_notify.sh +++ b/modules/subversion/templates/nonmaintainer_notify.sh @@ -28,7 +28,8 @@ PKGSLIST="$(mktemp)" trap 'rm -f "$PKGSLIST"' EXIT # Only look at changes in package files -svnlook dirs-changed -r "$REV" "$REPOS" | \ +svnlook changed -r "$REV" "$REPOS" | \ +sed 's/^....//' | \ pcregrep -o1 -o2 '^(?:(?:cauldron|misc)/([-+._a-zA-Z0-9]+)/)|(?:(?:updates|backports)/(?:[^/ ]+)/([-+._a-zA-Z0-9]+))' | \ sort -u > "$PKGSLIST" if [[ "$(wc -l "$PKGSLIST" | awk '{print $1}')" -gt "$MAXCHANGES" ]]; then @@ -40,7 +41,7 @@ fi # Send up to one e-mail per package modified in the commit for PACKAGE in $(cat "$PKGSLIST"); do - MAINTAINER="$(awk '{if ($1 == "'"$PACKAGE"'") print $2}' "$MAINTDB")" + MAINTAINER="$(awk '{if ($1 == "'"$PACKAGE"'") {print $2; exit;}}' "$MAINTDB")" # Only notify if the commit author is not the maintainer if [[ -n "$MAINTAINER" && "$MAINTAINER" != "nobody" && "$MAINTAINER" != "$AUTHOR" ]]; then @@ -50,7 +51,7 @@ for PACKAGE in $(cat "$PKGSLIST"); do --subject-cx \ --no-first-line \ --handler HTML::ColorDiff \ - --header "The user $AUTHOR has submitted a change to a package for which you are the registered maintainer." \ + --header "The user $AUTHOR has submitted a change to a package for which you ($MAINTAINER) are the registered maintainer." \ --revision-url "https://svnweb.<%= @domain %>/packages/?revision=%s&view=revision" \ --author-url "https://people.<%= @domain %>/u/%s.html" \ --to "$MAINTAINER@<%= @domain %>" \ |
