mkdir testrepo
cd testrepo
exec git init --initial-branch=main .

exec touch rules.yml
cp ../src/.pint.hcl .
env GIT_AUTHOR_NAME=pint
env GIT_AUTHOR_EMAIL=pint@example.com
env GIT_COMMITTER_NAME=pint
env GIT_COMMITTER_EMAIL=pint@example.com
exec git add .
exec git commit -am 'import rules and config'

exec git checkout -b v2

env GITHUB_AUTH_TOKEN=1
env GITHUB_PULL_REQUEST_NUMBER=1
env GITHUB_ACTION=1
env GITHUB_API_URL=://bad
! exec pint -l error --no-color ci
! stdout .
cmp stderr ../stderr.txt

-- stderr.txt --
level=ERROR msg="Execution completed with error(s)" err="creating new GitHub client: invalid base url: invalid url: parse \"://bad\": missing protocol scheme"
-- src/.pint.hcl --
ci {
  baseBranch = "main"
}
repository {
  github {
    owner     = "cloudflare"
    repo      = "pint"
  }
}
