Open kbaltrinic opened 9 years ago
The reason this was added was to prevent a broken URL if a repository was renamed, stash host was renamed, etc. Previously, the URL was determined at config time and stored. Now, with only the cloneType being stored, it allows for these changes to occur. So, it is necessary at this point, as the codebase relies on it when sending the notification.
I wasn't aware that there was the programatic API to setup the webhook (until the linked issue came up... still learning new things all the time about what's available) and that people are actually using it. I'll make a better effort in the future about documenting these types of changes for you and others that might be using that API.
I think it's fine you need to provide all parameters when updating the hook.
I am not sure if this was intended or an unexpected a side effect, but I think its the result of adaa1a7. Our automated hook creation script is now returning 400 bad request with the following response JSON:
Adding
"cloneType": "ssh"
to the posted JSON fixes the issue but seems like it should not be necessary.