This replaces kudu.disableGit env
To be considered
5. ScmType contains Hg, block /deploy with Git package
6. ScmType contains Git, block /deploy with Hg package
I think we should skip (4), as the local git endpoint is a good fallback, e.g. when github is down (see this tweet).
Other comment is that unlike what we do today with DisableGit, we should implement this more dynamically instead of doing it at the route level when the AppDomain starts. And we should also move away from our AppSettings class, and use the unified settings instead.
There is a small issue with 3.ScmType == LocalGit, block /deploy endpoint
The intention is we don't want to have anything deployed via CI if we are in LocalGit mode. This works well when switch from CI to LocalGit. This however does not prevent if one switches from GitHub -> LocalGit -> CodePlex. I think it is rare and we could address this by documentation (one should remove the hook). Otherwise we can make /deploy sensitive to individual ScmType. Too complicated?
Another issue is for not-yet-supported-by-portal like Gitlab, Codebase that users do a manual walkthrough (set key, hook url, etc.). Since initial state would be LocalGit, they may need to do one extra step by setting ScmType != LocalGit (say to GitHub).
I think we should keep this simple and not block too many things. It could be as simple as saying:
I think that is best.
Fix in 31689d9