klarna / bec

The BitBucket Erlang Client
Apache License 2.0
47 stars 12 forks source link

Workzone does not apply changes if project id is provided in lowercase #34

Closed robertoaloi closed 2 years ago

robertoaloi commented 3 years ago

Project ids in BitBucket seem to be enforced to use uppercase letters. Let's say we have an ANIMALS project and a repo named pigeon. Given the following config:

project: animals
repo: pigeon

wz-branch-reviewers:
  - branch-id: main
    groups: []
    users: []
    paths:
      - path: 'deployments'
        groups:
          - operators
        users: []

The following call will succeeds, but the reviewers will not be applied to the repo. Changing the project name to project: ANIMALS will fix things.

One would assume that the workzone plugin API call would fail for a non-existing project, but since that is out of our control, we may want to force-uppercase the project name when performing calls.

jesperes commented 2 years ago

Fixed in #59