Duplicated deploys and duplicated webhooks

Whew, that makes much sense! Both that there would be two (causing two builds) and that the reason for the two would be “configured two netlify sites to use this repo”. When you or we remove a netlify site or its repo association, we do NOT (cannot, if we do it, since we have no permissions to your git login; only your browser has them!) remove any webhooks that were configured prior, so you’ll need to clean those up yourself if you re-re-reconnect that repo :slight_smile:

Our API cannot manage hooks for you; you’d need to write your own code against GitLab’s API to automate that and we won’t be able to advise you on that. Usually I advise people to do it via their UI since I know how to do it there and it is only a couple clicks; if you need something more advanced you’ll have to build it.

Your last point doesn’t quite map to how we handle notifications from the git provider. Here’s the details you’ll need to understand how it works and plan your workflows:

  • One hook on a repo will notify ALL netlify sites connected to that repo, regardless of who configured either side.
  • the URL’s in your screenshot, “https://api.netlify.com/hooks/gitlab” are “build from a gitlab commit ONLY” and will show the above behavior. HOWEVER there are per-site buildhooks you can configure here (and manually put in place at GitLab to use instead or in addition): Build hooks | Netlify Docs
  • You should configure how each site builds - e.g. skip branches or PR’s, only build when you tell us rather than on every commit, don’t build at all sometimes, etc. Though it is targeted at the use case of “reduce my bill”, it is perfect for your needs today too: this article describes your options for configuration: [Support Guide] How can I optimize my Netlify build time?
  • people who do not have administrative access to your repo, at GitLab, will not be able to connect it to any site on Netlify, whether the Netlify site is in your account or in their account. So unless you are giving our administrative access to all of your other developers, they’ll need to at a minimum fork to connect it to Netlify.

Hopefully that helps you design a good workflow for your needs!