Open IstoraMandiri opened 2 years ago
I don't understand, do you mean that the plugin triggers on a repository on which it's not installed?
See this PR. It is https://github.com/ethereumclassic/ethereumclassic.github.io/pull/926
In the build, it is triggering an index, even though it is just a preview PR onto master, but the source repo is an outside contributor's "master" branch. I want to skip indexes for this scenario and only index when the main repo's master branch updates.
https://app.netlify.com/sites/ethereumclassic/deploys/6348c9bd9df5ae0008f78441#L212
I see, thanks for the explanation. Indeed we'd have to see if there is a way to differentiate those preview PRs from the actual repository on Netlify side. Thanks for reporting!
You are welcome.
Hopefully a fix is able to be identified as there are probably a few repos out there that generate previews from PRs, and using this plugin in this way could lead to search indexes being vandalized.
@sbellone This can now be worked around using https://www.netlify.com/blog/scopes-and-contextual-values-for-environment-variables-ga/
EDIT: My mistake, this is only true for the gatsby-plugin-algolia indexing plugin, not the netlify plugin itself, sorry.
Still need this feature.
It seems that PR previews will trigger a full index if they have the same branch name as those defined in
plugins.inputs
.Is there a way to skip the index when a repository, not just the branch, is specified?