Determine if the current TFS build is triggered by a Git Pull Request
Today I saw a nuget package that was build during a build that was validating a pull request being published to the package source in a team foundation on premise instance.
So I used the TFS Build Variable Definition in combination with MsBuild Property Functions to figure it out.
Here is the code: