Closed pixelastic closed 3 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.
PUT https://api.netlify.com/api/v1/sites/{site-id}
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
PUT
PATCH
I need to try if I can pass the skip_prs to it.
skip_prs
This was actually pretty simple, just passing a skip_prs: true to the already existing PUT call.
skip_prs: true
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}
withbuild_settings.skip_prs: true
.Going back to the documentation, there is no
PUT
method defined for the sites, but there is aPATCH
one that might be re-usable: https://open-api.netlify.com/#operation/updateSiteI need to try if I can pass the
skip_prs
to it.