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
! exec pint --no-color ci
! stdout .
cmp stderr ../stderr.txt

-- stderr.txt --
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check on current git branch" base=main
level=INFO msg="Checking Prometheus rules" entries=0 workers=10 online=true
level=INFO msg="No rules found, skipping Prometheus discovery"
level=ERROR msg="Execution completed with error(s)" err="GITHUB_PULL_REQUEST_NUMBER env variable is required when reporting to GitHub"
-- src/.pint.hcl --
ci {
  baseBranch = "main"
}
repository {
  github {
    baseuri   = "http://127.0.0.1:6217"
    uploaduri = "http://127.0.0.1:6217"
    owner     = "cloudflare"
    repo      = "pint"
  }
}
