pixelastic / norska

🏔️ Custom SSG using Pug, Webpack, PostCSS and Tailwind.
https://projects.pixelastic.com/norska/
MIT License
8 stars 0 forks source link

Automatically disable deploy previews when setuping Netlify #57

Closed pixelastic closed 3 years ago

pixelastic commented 4 years ago

Newly linked sites have their deploy previews enabled. I currently don't need them as I don't work with PRs yet, so it would be sensible to disable it.

I couldn't find a endpoint on https://open-api.netlify.com/ to do it.

But, by checking the official website, it seems that it's a PUT https://api.netlify.com/api/v1/sites/{site-id} with build_settings.skip_prs: true.

Going back to the documentation, there is no PUT method defined for the sites, but there is a PATCH one that might be re-usable: https://open-api.netlify.com/#operation/updateSite

I need to try if I can pass the skip_prs to it.

pixelastic commented 3 years ago

This was actually pretty simple, just passing a skip_prs: true to the already existing PUT call.