klarna / bec

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

Fix branch restriction sorting, add support for auto-unapprove #25

Closed pilucca closed 3 years ago

pilucca commented 3 years ago

Branch restrictions comparison fails because Actual are sorted before removing id field.

This leads to false positive check when comparing actual branch restriction and expected.

Added support of Auto-unapprove field for pullrequests settings

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

Wingless-Archangel commented 3 years ago

Could you please try using elvis to format your changes? the error is not about the syntax but the format error.

robertoaloi commented 3 years ago

Hi @pilucca and thanks for your contribution! Would you mind including the new option in the sample_repo_configuration.yml file in the root dir, too? It also looks like the linter complains about a too-long line :)

pilucca commented 3 years ago

Hi @pilucca and thanks for your contribution! Would you mind including the new option in the sample_repo_configuration.yml file in the root dir, too? It also looks like the linter complains about a too-long line :)

Uh, I forgot about the sample yaml. I'll do, and I'll also rebase, as I just saw there're new commits upstream

robertoaloi commented 3 years ago

Thanks!

robertoaloi commented 3 years ago

@pilucca Unfortunately, the property-based tests we run internally also found an issue with the `auto-unapprove" part of this PR (it's a bit tricky to run them from GitHub since they rely on internal infrastructure, so apologies for the after-merge feedback). From what I can tell, this feature is not part of the Core BitBucket API, but it is provided by an Atlassian plugin:

https://docs.atlassian.com/bitbucket-server/rest/7.10.0/bitbucket-rest.html#idp409 https://marketplace.atlassian.com/apps/1211449/auto-unapprove-for-bitbucket-server?hosting=server&tab=overview

The current implementation makes it mandatory, so it would cause a failure in a system which does not have the plugin installed. I think we need to make it optional, if we want to support the plugin.