I couldn't find a way to distinguish between manually triggered and auto triggered jobs in my pipeline script, using tfs-plugin. What ever i trigger the build mannually or by a code push the result of "currentBuild.getBuildCauses()" : [\{"_class":"hudson.model.Cause$UserIdCause","shortDescription":"Démarré par l'utilisateur Admin Jenkins","userId":"admin","userName":"Admin Jenkins"}] I think that the Cause class https://javadoc.jenkins-ci.org/hudson/model/Cause.html should be extended to keep track of why a given build was started.
Looks like a bug to me in whatever triggers the build, otherwise the build cause should be a different class (for example jenkins.branch.BranchEventCause or hudson.triggers.TimerTrigger$TimerTriggerCause)