Update notification for acceptance promotion/pass 2
# Get current sha, then find the one right after that via the ancestry-path; that is where we start.
current_sha=$(curl https://packages.chef.io/manifests/current/automate/latest.json 2>/dev/null | jq -r '.git_sha');
-current_date=$(git log -1 --pretty=%cI "$(git rev-list --ancestry-path "$current_sha"..HEAD | tail -1)")
+# date renders as e.g. "2021-01-27T10:16:58+00:00" so we need to urlencode the plus sign
+current_date=$(git log -1 --pretty=%cI "$(git rev-list --ancestry-path "$current_sha"..HEAD | tail -1)" | sed -e s/\+/%2B/)
# Get the date of the latest acceptance sha and add one second to it, otherwise it does not appear in the list!
acceptance_sha=$(curl https://packages.chef.io/manifests/acceptance/automate/latest.json 2>/dev/null | jq -r '.git_sha');
acceptance_date_tmp=$(git log -1 --pretty=%cI "$acceptance_sha")
-acceptance_date=$(date -d "$acceptance_date_tmp + 1 second" '+%Y-%m-%dT%H:%M:%S%z')
+acceptance_date=$(date -d "$acceptance_date_tmp + 1 second" '+%Y-%m-%dT%H:%M:%S%z' | sed -e s/\+/%2B/)
read -r -d '' message <<EOF
<!here> Automate has been promoted from \`dev\` to \`acceptance\` :successful:
