I have an Azure DevOps pipeline build configuration which builds automatically with the master branch. I want to access the GitHub user or username who committed last.

If I access variables $(Build.QueuedBy) and $(Build.RequestedFor) in a build that I triggered manually from the portal, I get the outputs as Sith and Sith respectively.

But when I pushed code to master and triggered automatically with CI, I get outputs for the variables as Microsoft.VisualStudio.Services.TFS and Microsoft.VisualStudio.Services.TFS respectively.

I can access all other variables like $(Build.DefinitionName) and $(Build.BuildNumber)
in all the cases without any issues.

How to get Github username variable as Sith instead of Microsoft.VisualStudio.Services.TFS?

  • Can we get this done using bash if this is not supported by pipelines by default?
    – sithumc
    Commented Jun 10, 2019 at 8:28

1 Answer 1


This is not supported by Azure DevOps pipelines yet. Microsoft will provide it soon. Will update this post once they made it available.

Pretty straight forward way to get last commit user in Bash:
git log -1 --pretty=format:'%an'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.