-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to prevent PRs from indexing #843
Comments
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 ethereumclassic/ethereumclassic.github.io#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?
The text was updated successfully, but these errors were encountered: