GithubHelp home page GithubHelp logo

leventyil / git-analytic Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 8.06 MB

An application that gives you information about pull requests and commits in a Github or Azure DevOps repository with using GraphQL and REST API.

C# 93.25% HTML 6.09% CSS 0.57% JavaScript 0.10%
github graphql rest api-client azure-devops graphql-client rest-client repository-tools productivity team-management

git-analytic's Introduction

Git-Analytic

An application that gives you information about pull requests and commits in a Github or Azure DevOps repository with using GraphQL and REST API’s.

Getting Personal Access Tokens

You need Personal Acces Tokens for reading repository information.

Github

In Github, You can create one from the Settings>Developer settings>Personal access tokens page.
Application only needs the “repo” scope.

Azure DevOps

In Azure DevOps, you can create one from the User Settings page.
While creating this PAT, you should select the “Read” and “Status” permission in the “Code” scope.

Configuring the Application

With PAT, application also needs user or organization name and if you want to use it with Azure DevOps, project name too.
We store this information at appsettings.json file.
If you want to use the application with Github profile or organization, you should enter “1” for “isGithubRepo” value.
For understanding that is it a user or organization account, application also needs “isUserRepo” value.
Because when requesting repositories from the GraphQL API, we must use different queries for user and organization profiles.

a

How Application Works

Github queries are cURL’s converted from JSON query strings with escaped double quotes and curly braces.
The below one is a REST API URL for Azure DevOps.

a

You can find or create queries with using APIs documentations.

With Http Client, we send a request that includes the selected query and headers to the API and then deserialize the json response with to a Model.

a

Application uses two different Models, one for GraphQL response and the other one for REST.
With using models, it prints information about selected repository’s pull requests and top 10 user with the most commits, for now 😊

Here are some useful links:

https://docs.github.com/en/graphql

https://graphql-dotnet.github.io/docs/getting-started/introduction

https://docs.microsoft.com/en-us/rest/api/azure/devops/git/?view=azure-devops-rest-6.0

https://www.dotnetperls.com/common-elements-list

https://app.quicktype.io/

git-analytic's People

Contributors

leventyil avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.