Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BEC shall not delete merge checks when enforcing hooks #15

Open
robertoaloi opened this issue Oct 14, 2020 · 0 comments
Open

BEC shall not delete merge checks when enforcing hooks #15

robertoaloi opened this issue Oct 14, 2020 · 0 comments

Comments

@robertoaloi
Copy link
Contributor

Consider a repo with some basic PR restrictions and hooks:

pr-restrictions:
  required-approvers: 2
  required-successful-builds: 1
  required-all-approvers: true
  required-all-tasks-complete: true

hooks:
  - key: com.klarna.bitbucket.needs-work-check:needsWorkBlocker
    enabled: true
    settings: {}

In recent versions of Bitbucket the PR restrictions are implemented via merge check hooks, and are listed as hooks too on the REST interface.

The problem is that when someone changes the hooks for this repo, and BEC enforces the hooks, it also deletes the merge check hooks. Then it has to enforce the pr restrictions again.

It's just pure luck that hooks are checked before pr restrictions, so at the end we arrive to the correct config. But this should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant