abrader / abrader-gms

Git management system types and providers for Puppet utilizing Github, Gitlab, Stash APIs
Apache License 2.0
26 stars 32 forks source link

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

Open npwalker opened 8 years ago

npwalker commented 8 years ago

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.

abrader commented 8 years ago

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

npwalker commented 8 years ago

@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.

abrader commented 8 years ago

@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).

npwalker commented 8 years ago

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

abrader commented 8 years ago

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

npwalker commented 8 years ago

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.

abrader commented 8 years ago

@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?

npwalker commented 8 years ago

@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.