diff options
| author | Dan Fandrich <danf@mageia.org> | 2025-11-17 09:27:32 -0800 |
|---|---|---|
| committer | Dan Fandrich <danf@mageia.org> | 2025-11-17 09:27:32 -0800 |
| commit | 08c5240e543cf107623652f7dc63b0b185c5314f (patch) | |
| tree | 059e5f3eec6ec289737b9cfaaa51506f86bbec85 /modules/subversion | |
| parent | 155a610ee6bd0b2b8369e81448adb4d3f1084740 (diff) | |
| download | puppet-08c5240e543cf107623652f7dc63b0b185c5314f.tar puppet-08c5240e543cf107623652f7dc63b0b185c5314f.tar.gz puppet-08c5240e543cf107623652f7dc63b0b185c5314f.tar.bz2 puppet-08c5240e543cf107623652f7dc63b0b185c5314f.tar.xz puppet-08c5240e543cf107623652f7dc63b0b185c5314f.zip | |
Improve nonmaintainer_notify.sh
- Send messages also when packages are moved to obsolete
- Mention the maintainer name explicitly in the message
- Be more robust in handling a malformed maintdb.txt with duplicate
entries
Diffstat (limited to 'modules/subversion')
| -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 %>" \ |
