Skip to content

Provide insight into GitHub users, organizations and repositories using the GitHub GraphQL API v4 and PowerBI

License

Notifications You must be signed in to change notification settings

cloudbeatsch/project-lenis

Repository files navigation

To Do In Progress

About project-lenis

Provide insight into GitHub users, organizations and repositories using the GitHub GraphQL API v4 and PowerBI.

Architecture

Architecture overview

  • Each capability (e.g. the creation of a collaboration graph) is implemented as an independent nano service. The output of each nano service is written into a document collection of the shared Azure Cosmos DB. Each service implements its own Power BI template to visualize its data.
  • The final Power BI report includes the Power BI templates provided by the different nano services.
  • If a nano service requires sequential processing (e.g. extract the key contributors for each repository), the task should be split into multiple functions which are triggered by a queue message.
  • AppSettings (e.g. which repositories should be processed/excluded) are set through the CLI tool.

Deploy to Azure

In order to use project-lenis the first thing you'll need to do is to deploy the Azure resources to your Azure subscription. Click the Deploy to Azure button (below) to kick off a deployment.

You will be required to provide the following parameters:

  • appName: A unique identifier for your app deployment
  • githubToken: A Personal Access Token for GitHub. You can generate one here
  • databaseAccountName: A unique identifier for your CosmosDB account name
  • organizations: A comma seperated list of organisations to query against

Deploy Services Locally

  • Install the functions core tools on your local machine if they do not already exist
npm i -g azure-functions-core-tools
  • Navigate to the azure functions directory
cd $REPO_ROOT/azure-functions
  • Install Nodejs dependenices
npm install
  • Create a local settings file if you do not currently have one
cp appsettings.json local.settings.json
  • Check appropriate values are set in your local.settings.json file

  • Run the azure functions runtime host

func host start --debug vscode
  • Open the folder project-lenis in Visual Studio Code, switch to the Debug view and select Attach to Azure Functions

  • Open a new terminal and navigate to the $REPO_ROOT/azure-functions directory

  • Execute the individual functions

func run your-function-name

Custom Nano Service Development Guidance

  • Create a new folder within the azure-functions directory. Name it the same way as your nano service is called (e.g. github-repositories). Place all your function files into this folder.
  • Name your document collection by using the nano-service name followed by the description of the collection itself (e.g. githubRepositories)
  • Save your Power BI template in the power-bi folder. Name the same way as your nano service called (e.g. github-collaboration-graph.pbit)

Configuring the PowerBI datasources

Edit the data query and set for each query the datasource to your CosmosDB endpoint. Provide the account key when requested.

Development Tools

Useful Documentation

About

Provide insight into GitHub users, organizations and repositories using the GitHub GraphQL API v4 and PowerBI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages