#!/bin/bash set -o pipefail org='PokeAPI' data_repo='api-data' engine_repo='pokeapi' branch_name='testbranch' username='pokeapi-machine-user' email='pokeapi.co@gmail.com' function cleanexit { echo "Exiting" echo "$2" exit "$1" } prepare() { mkdir -p ./repositories cd repositories || cleanexit 1 "Failed to cd" } get_invokator_pr_number() { if [ -z "$CIRCLE_PULL_REQUEST" ]; then echo "${CIRCLE_PULL_REQUEST##*/}" fi } clone() { git clone "https://github.com/${org}/${data_repo}.git" "$data_repo" } configure_git() { git config --global user.name "$username" git config --global user.email "$email" } notification_comment_content() { cat <