Trying to figure out how to programmatically enable/disable the "JIRA ID validator All Commits in a push" hook feature on a BitBucket repository.
What kind of programmatic rules are you thinking of setting up?
Are you an admin for that repo? Or just a regular user? If you're an admin take a look under "Repository --> Settings --> Hooks" as well as "Merge Checks" to see if there's anything in there you can adjust.
There are several popular free and paid add-ons for enforcing git policy like this: ScriptRunner (paid), Jira Hooks (paid), Commit Policy (paid), Yet Another Commit Checker (free), and Control Freak (free).
In theory you *could* develop your own plugin to programmatically enable/disable JIRA checking rules to suit your specific needs, but in my own experience it's a lot of work! (My company develops and maintains the free Control Freak add-on).
Have some rules enforced for users that we don't want the admins to have to abide with. Have some remote automation that needs to be able to bypass those rules. Just wondering if the BitBucket API would allow doing stuff like that via curl.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you asking about Bitbucket Cloud or Bitbucket Server?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just checked and ScriptRunner, Jira Hooks, Yet Another Commit Checker, and Control Freak all support some form of "skip checks if user = x" config.
(I can't be bothered to check Commit Policy because that add-on requires installation and config on both JIRA and Bitbucket --- too much work for me right now!)
Do you know if the "JIRA ID validator All Commits in a push" logic you're referencing comes from a particular add-on? I am not familiar with Bitbucket Server offering anything like that out of the box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's configured with Jira plugins. That's the plugin we're trying to end run.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm pretty sure you can enable/disable a plugin through the REST API using sys admin credentials. Note: that disables it site-wide (disabled for all repos across all nodes of your datacenter instance).
I suspect the "Universal Plugin Manager" API documents will help you get started on that course of action: UPM REST API
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.