Home > OS >  $(System.PullRequest.SourceBranch) no found
$(System.PullRequest.SourceBranch) no found

Time:11-25

Referring to the documentation: enter image description here

It does not work if you trigger your build just for some branch:

enter image description here

I`ve tested only this line:

git checkout -b $("$(System.PullRequest.SourceBranch)".replace('refs/heads/', ''))

Check your build validation policy: Improve code quality with branch policies

CodePudding user response:

I solved my problem by adding the following template inside of my pull request description:

Description Thank you for your contribution to the Bla Bla repo. Before submitting this PR, please make sure:

  • [ ] Fix
  • [ ] Feature
  • [ ] Big

Now, my script is working.

  • Related