Allow Auto Unapprove to be set at the Project Level

Issue #16 resolved
Mark Ottaviani created an issue

Bitbucket Server 5.2 introduced the ability to set most permission settings at the project level. However, this plugin still must be set on individual repositories on it's own settinsg page. It would be a a great help to be able to set Auto Unapprove at the project level.

This has also been mentioned in the Plugin Reviews by others: https://marketplace.atlassian.com/plugins/com.atlassian.stash.plugin.stash-auto-unapprove-plugin/server/reviews

Thanks!

Comments (8)

  1. Bryan Turner Account Deactivated

    Apologies for there not being any response/update on this ticket sooner. Unfortunately, the response I can provide isn't really what you're looking for.

    When project-level settings were introduced, we didn't add support for a "General" tab for pull requests at the project level. That means for all released versions of Bitbucket Server that support project-level settings (5.2 to 5.16, inclusive), there are no built-in extension points for adding the toggles that configure this. Additionally, the REST fragment that allows configuring auto-unapprove behaviors at the repository level is also not supported (in Bitbucket Server's code) at the project level.

    The combination of all those things means that adding this at the project level is not a straightforward change like might be expected, and that, in turn, is why it hasn't been done.

  2. Kristy Hughes

    As of 4.1.0, users are able to configure the auto-unapprove plugin at a project or global level. Projects and repositories can override their inherited setting to configure their own settings.

  3. Mark Ottaviani reporter

    Thank you very much for implementing this change, we’ll be making use of it right away!

  4. Charlie Pikscher

    This is AWESOME, thanks!

    Is it possible to control this via the REST API? /rest/api/1.0/projects/{projectKey}/settings/pull-requests/{scmId}, for example.

    Edit: Nevermind, it is available via rest/auto-unapprove/1.0/projects/{projectKey}/settings

  5. Tamas Szabo

    Hey sorry but I did not find even 1 sentece about this endpoint anywhere.
    Could you give me what is the param in case of post?
    The delete call is working well, but the POST is 400 I have only the “enabled” param set which is true.
    But this is not good.

    Thanks!

  6. Log in to comment