Posts

Showing posts from May, 2020

Azure DevOps - getting project stats for all projects

Image
If you have quite a lot of projects in your Azure DevOps organization and is looking for a way to filter the inactive projects out, that’s what   we will discuss today.   This is going to be based on the data the we see in the "Project stats" section on the landing page of an ADO project. This data gets fetched using the   "Contribution/HierarchyQuery/project" REST Api, which for some reason doesn't seem to be documented. So we may have to keep an eye out for any changes.   The apis lets you get project stats like: Work Items : created and updated Repos : Commits pushed with the number of authors, PRs created and completed the range can be specified, and accepts a maximum value of 30 days. If you use TFVC, that data is also returned - like the number of changesets and authors. I am not using it for the calculation here as we don't use TFVC.  You can also get the metrics for builds and releases - j ust in case you are interested, the

Export the members of a project level group from all the projects in an Azure DevOps

Image
How many project administrators do you have on an average per project? Though there is no real mandate or best practice on the number, I think you don’t want too many people with project admin privileges. This could also be an auditing question to figure out who can do what. Same can be the case with Build and Release admin group, other default groups or any of the custom security groups that you may have created at the project level. If you are trying to export such a list, here is a script that can help you. You can provide any project level group as the input to the script, and it will export a list containing the members of the group, across all the projects in your organization to a csv file.  The script lists both users and groups that are members of the group given as input, but do not expand groups further. You can then filter by project to look at the details of individual projects. How to run the script: The script takes three parameters: Name of th