Hey community,
I hope you can help me out here. I am using Netlify together with lerna and multiple gatsby projects.
I have written a custom plugin that is cancelling builds when the subroute is not affected:
const { status } = spawnSync("git", ["diff", "--quiet", "@~..@", "."])
if ( status === 0) {
utils.build.cancelBuild(
`Build was cancelled because current Project is not affected by the latest changes`
)
}
This is working just fine, but this leads also to the issue that every build gets cancelled when I trigger it manually through the UI.
Is there any way to detect whether a build has been manually triggered?
I did only find the environment variables about telling me if the trigger is a PR or a webhook, but I did not find anything in regards to manually triggered builds.
Is there a chance to detect them also?
Kind regards,
Stefan