Hi team
Is there a way to enable "Simple bitbucket commit checker" configurations for multiple git repos in bitbucket.
I do not want to do that one-by-one. Please suggest a way to perform this in one go.
Please help.
I wrote a script (perl) to perform this task using Bitbucket-API.
What I basically did within my script
Just a little basic scripting ...
Hi Kilian, Thanks for writing back.
Even I tried to make things work but rest-api command is not working for me and I am all stuck.
Can you please share your perl script for me to have a look. I would appreciate.
Akul.Bhatnagar@gmail.com
Anyone have any idea, why below rest-api is not working. I am trying to enable a hook called sscc for one the repository using rest-api. It gave me an error.
curl -sS -X PUT -u username:pass http://<hostname>:7990/rest/api/1.0/projects/ABC/repos/sample_repo/settings/hooks/se.bjurr.sscc.sscc/enabled | jq -r
OUTPUT:
{ "errors": [ { "context": null, "message": "An error occurred while processing the request. Check the server logs for more information.", "exceptionName": null } ]}
@Akul Bhatnagar - sorry I'm not allowed to share my code due to our policies ;-/
Just an guess, why your curl request might not work: your hook-key "se.bjurr.sscc.sscc" looks strange in comparison to what I use: "com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook" (mind the colon)
Try to get the available hooks first (using https://developer.atlassian.com/static/rest/bitbucket-server/4.5.2/bitbucket-rest.html#idp2911664) and check whether the hook key you used is correct
It looks like you're new here. Sign in or register to get started.