mirror of
https://github.com/ansible/ansible-documentation.git
synced 2026-03-26 13:18:58 +07:00
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.
15 lines
329 B
Bash
Executable File
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"
|