Posted on Leave a comment

Azure DevOps inventory – export data for devops organization

Inventory is necessary for many organizations when it comes to technology tools and services. As Azure devops is a complex tool which includes many services such as Repositories, Pipelines, Test Runs and more, you may want some times to export a dump of the created assets inside your DevOps account.

Using the below powershell script, you can export

  • Agent pools
  • Agents
  • Repositories
  • Projects
  • Pipelines

https://github.com/geralexgr/azure-devops-inventory

The first version of the tool will display all the information gathered through Azure DevOps REST API on the output console. On future versions I will improve the output and also the gathered information.

You can execute the inventory script by following the instructions on Github. The only thing that you will need to provide is a PAT token inside the $organizations hashtable.

$organizations= @(
    @{name="ORG_NAME";token="TOKEN"},
    @{name="ORG2";token="TOKEN2"}
)

After the execution you will get the information in the console output.

Posted on Leave a comment

Export Github Organization Dependencies as text

Github has introduced a powerful feature to get complete view on your project dependencies. This feature is available per project but also for a whole organization which could contain hundred of projects.

You can get all your dependencies for your organization using the below link (ORG should be replaced with your GitHub organization name)

https://github.com/orgs/ORG/insights/dependencies

I was searching a method to get massively these dependencies exported as a file. I could obtain this information using the below code with the inspect element section of Chrome browser.

elements = document.getElementsByClassName("js-navigation-open");
for (var i=0; i <elements.length; i++ ){
    var singleElement = elements[i];
    console.log(singleElement.outerText);

The result is a list with the names of the dependencies.

Unfortunately this method will only get the dependencies that are present on each page that you are currently browsing.