Commit 976284fb authored by Daniel Leidert's avatar Daniel Leidert

Add a script to enable the Emails-on-push service.

https://wiki.debian.org/Salsa/Doc#Email_notifications
parent 247514eb
#!/bin/bash
set -ex
path=$(dirname $(readlink -f $0))
source ${path}/svn2git.rc
if [ -z $@ ]
then
echo "Without any argument, we will work on the REPOS specified in svn2git.rc."
excludes=${EXCLUDE_REPOS}
else
excludes=
fi
projects=${@:-${REPOS}}
for p in $projects
do
[ -z "`echo ${excludes} | grep -w ${p}`" ] || continue
echo "Enabling \"Emails on push\" service for project ${SALSA_GROUP}/${p} ..."
curl --request PUT \
--header "PRIVATE-TOKEN: ${SALSA_TOKEN}" \
--data "send_from_committer_email=1&disable_diffs=0&recipients=${SALSA_PROJECT_PUSH_MAIL}" \
${SALSA_URL}/projects/${SALSA_GROUP}%2F${p}/services/emails-on-push
done
exit 0
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