http response bitbucket / 200 OK
http start bitbucket 127.0.0.1:6075

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

cp ../src/v1.yml 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
cp ../src/v2.yml rules.yml
exec git commit -am 'v2'

env BITBUCKET_AUTH_TOKEN="12345"
pint.error -l debug --no-color ci --require-owner
! stdout .
stderr 'level=debug msg="Sending a request to BitBucket" method=PUT'
stderr 'level=debug msg="BitBucket request completed" status=200'
stderr 'level=debug msg="Sending a request to BitBucket" method=DELETE'
stderr 'level=debug msg="BitBucket request completed" status=200'
stderr 'level=info msg="Problems found" Bug=1 Fatal=1'
! stderr 'parse error: unclosed left parenthesis'

-- src/v1.yml --
groups:
- name: mygroup
  rules:
  - record: rule1
    expr: sum(foo) by(job)
-- src/v2.yml --
groups:
- name: mygroup
  rules:
  - record: rule1
    expr: sum(foo) by(job
-- src/.pint.hcl --
ci {
  baseBranch = "main"
}
repository {
  bitbucket {
    uri        = "http://127.0.0.1:6075"
    timeout    = "10s"
    project    = "prometheus"
    repository = "rules"
  }
}
