project defaultScript is not getting added in the event secret
Data mounted from event secret is missing the script key.
As a result of this if /vcs/brigade.js and /etc/brigade-default-script/brigade.js is missing and the users are depending on the project's defaultScript things will break.
The fix for this is to add Script key in here
https://github.com/Azure/brigade/blob/master/pkg/webhook/github.go#L229
I will raise a PR for the same.
A default script should not be added to the event's secret. It should be injected into the worker by the controller, and read during worker startup in the prestart.js. Gateways are not supposed to make decisions about defaults. They are just supposed to pass what they are given. The Controller and Worker are responsible for filling defaults in.
Closing for now, but feel free to reopen if you have additional questions.
Thanks!