Hi,
I have "Yet Another Commit Checker" Plugin installed and I can enable configured hook using REST-API like this:
curl -k --user user:passwd -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -X PUT https://bitbucket_url.com/rest/api/1.0/projects/my_project/repos/demo/settings/hooks/com.isroot.stash.plugin.yacc:yaccHook/enabled
After that I can see the hook is enabled:
curl -u user:passwd https://bitbucket_url.com/rest/api/1.0/projects/my_project/repos/demo/settings/hooks/com.isroot.stash.plugin.yacc:yaccHook
{"details":{"key":"com.isroot.stash.plugin.yacc:yaccHook","name":"Yet Another Commit Checker","type":"PRE_RECEIVE","description":"Yet Another Commit Checker pre-receive hook.","version":"1.24","configFormKey":"com.isroot.stash.plugin.yacc:yaccHook-config-form","scopeTypes":["PROJECT","REPOSITORY"]},"enabled":true,"configured":true,"scope":{"type":"REPOSITORY","resourceId":842}}
But how can I disable that hook via REST-API? I'm a bit confused :)
You use:
curl -k --user user:passwd -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -X DELETE https://bitbucket_url.com/rest/api/1.0/projects/my_project/repos/demo/settings/hooks/com.isroot.stash.plugin.yacc:yaccHook/enabled
Do you have news ?
i've the same question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See my reply...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.