Search code examples
tfsbuild-management

See who set a build to retain indefinately in TFS


All developers in our companies teams can put a build to retain indefinitely. We use TFS 2017. In the history of a build, you can see that the build has been set to retain indefinitely, but NOT, WHO did this. We want to know this, because this helps us when months later we can ask this person if it still needs to be retained. How can you find out who put the build to retain indefinitely?


Solution

  • There is no way to find who asked to switch retain indefinitely as I see, because the history of build changes is not being stored. However you can see who changed the build previously using Rest API - will be a guess work.

    https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}?api-version=2.0

    lastChangedDate and lastChangedBy are the objects.