abrader-gms icon indicating copy to clipboard operation
abrader-gms copied to clipboard

Document that at least the gitlab provider creates new webhooks when the url changes

Open npwalker opened this issue 9 years ago • 8 comments

As far as I can tell the namevar for gitlab is the url, so when I change the url I end up with two webhooks. There's no way around that since gitlab doesn't allow naming the webhook but it should be documented that this is the behavior.

Also, if we allowed purging un-managed webhooks then that would make for a good example to avoid orphaned webhooks.

npwalker avatar Nov 16 '15 21:11 npwalker

https://github.com/abrader/abrader-gms#name

abrader avatar Nov 16 '15 21:11 abrader

@abrader okay but that doesn't map to anything in gitlab right? So, if I provide a name it won't prevent me from getting new webhook every time I change the URL will it?

So, maybe my point is to document that the behavior is to get multiple webhooks when you change the url instead of modifying the one you already made.

npwalker avatar Nov 16 '15 21:11 npwalker

@npwalker name is parameter since as you know it does not map anything per our discussion. Since name is apart of the payload returning from 2/3 of the currently supported providers, that is likely to change soon in conjunction with the self.instances revamp I am working on. That will name new types to gms_ so in this case gms_webhook therefore slowly deprecating the old resource types (i.e., git_webhook).

abrader avatar Nov 16 '15 21:11 abrader

then the examples should be updated to use a name attribute if it works better on Github and Stash?

https://github.com/abrader/abrader-gms#github-webhook-example https://github.com/abrader/abrader-gms#stash-webhook-example

npwalker avatar Nov 16 '15 21:11 npwalker

@npwalker Namevar is implied in the title of the examples you referenced. Your suggestion is namevar should be called out explicitly in the examples?

abrader avatar Nov 16 '15 21:11 abrader

Pretty much I just want to document that the behavior with gitlab is that whenever you change the URL you get a new webhook instead of modifying the original one. I'm not positive what the behavior on github and stash is.

npwalker avatar Nov 16 '15 22:11 npwalker

@npwalker since this is predicated on this feature being implemented (http://feedback.gitlab.com/forums/176466-general/suggestions/10730004-allow-naming-webhooks), do we want to close this for now and reopen in the case GitLab implements your suggestion?

abrader avatar Nov 20 '15 20:11 abrader

@abrader I don't think it's clear from the README that when you change the url of a webhook you will end up with a new webhook and the old one still in play.

The feature is a requirement to fix the code but not the documentation.

npwalker avatar Nov 24 '15 02:11 npwalker