1

I want to update the "Tag sources" option of certain builds to "never" or "on success" depending on certain conditions. I hoped for a way to do so from a Powershell script, which would in turn use the rest API.

Just for clarity, I'm speaking about that option from the UI:

enter image description here

I assumed it would be part of the build definition type, but I'm not finding anything conclusive in the documentation. There is an undocumented tags property but it doesn't seem to be relevant to my case.

Any help would be very appreciated.

Crono
  • 10,211
  • 6
  • 43
  • 75
  • @Matt Thanks for chiming in but I really do need to set the build definition option through REST. – Crono Aug 31 '20 at 19:08

1 Answers1

1

I monitored the network traffic of the POST updating the tag on the definition. I'm assuming you will want to add something similar to what you have already created for the build definition. It is captured under the BuildRepository Properties of the Build API.

labelSource = 0 = never
labelSource = 6 = onSuccess
labelsource = 46 = always

enter image description here

Matt
  • 3,658
  • 3
  • 14
  • 27