Files
ansible-docs/hacking/get_bot_user.sh
Maxwell G b02dc78b04 get_bot_user: use correct username in committer email (#664)
There is a small error in the Ansible Documentation Bot's committer
email used by the pip-compile jobs. There needs to be a `[bot]` suffix
in the username of a bot.
2023-10-19 12:36:33 -05:00

15 lines
329 B
Bash
Executable File

#!/usr/bin/bash -x
# Set Github committer to a bot user
set -euo pipefail
bot="${1}"
name="${2-${1}}"
path="https://api.github.com/users/${bot}%5Bbot%5D"
user_id="$(curl -sS "${path}" | jq -r .id)"
GIT="${GIT:-git}"
${GIT} config user.name "${name}"
${GIT} config user.email "${user_id}+${bot}[bot]@users.noreply.github.com"