How to: Exploring GitHub APIs to create reports on PowerBI

Vinicius Moura
3 min readJan 29, 2024

These PowerSell scripts explores GitHub APIs and create reports out of the box

During the process of learning GitHub, I started exploring its APIs and creating useful reports, mainly for the tool’s administrators. Below are some examples of this undertaking (click on each link for more details):

Every time we are creating repositories on GitHub and we need to apply protection rules on these repositories. Over time and with a large number of repositories, it becomes increasingly difficult to verify that all these repositories have the same protections applied. Thinking about it, I decided to create this report that extracts all repositories, respective default branch and all protection rules applied.

  • Secrets Mapping on GitHub = This script and report extract all secrets (organization, repositories and environments) within the GitHub organization. Many customers on GitHub use secrets to store sensitive information in your organization, repository, or repository environments to use in GitHub Actions workflows. Thinking about it, this report maps all secrets between these three levels (organization, repositories and environments) and presents them below.
  • Variables Mapping on GitHub = this report extract all variables (organization, repositories, and environments) within the GitHub organization. Many customers on GitHub use variables to store shared information in your organization, repository, or repository environments in GitHub Actions workflows. Thinking about it, this report maps all variables between these three levels (organization, repositories, and environments) and presents them below.

--

--