Git Product home page Git Product logo

github-tweaks's Introduction

Github Tweaks

A collection of useful scripts for Github organization admins.

GitHub Contributors

This script aims to calculate unique contributors of GitHub organization by working with GitHub API. Also It shows contributors who commited only to 1 repository. This can be helpful when your organization is about to purchase SaaS with licence model based on number of contributors.

Last but not least the script tries to exclude contributors from previous version control services. They can appear after migration from Gitlab to GitHub or from GitHub On-Premise to GitHub Cloud.

Usage

--org_name name of your organization

--gh_token GitHub API token. Read more how to acquire a token here

Usage example

$ python contributors.py --org_name test_org --gh_token <YOUR_API_TOKEN_HERE>
Organization test_org has 5 total contributors
Calculating contributors per repository...
Repository test_repo1 has 3 total contributors and 0 unique contributors: []
Repository test_repo2 has 5 total contributors and 2 unique contributors: ['user1', 'user2']

Rule insights

This script collects useful statistic about repository rulesets of Github organization. It calculates specified ruleset passed rate per repository and shows the user who break the rule most times. This can be useful for ruleset evaluation since built-in ruleset insights lacks such information.

Usage

--org_name name of your organization

--session_cookie As of August 2023 there is no API for ruleset insights. Thus it is not possible to use Github API token and value of user_session cookie is required

--ruleset name of ruleset to get statistics for

--period time period to gather statistic for. Default is month, options for hour,day and week are also available

Usage example

$ python rule_insights.py --org_name test_org --session_cookie <YOUR_user_session_COOKIE_HERE> --ruleset test_ruleset
Start getting rule suite results for last month...
Received a total of 64 rule suite runs.
Calculating statistic for rule "test_ruleset" runs...
Statistics for repository test_repo1: 55.0% passed rate. Most failed actor: user1
Statistics for repository test_repo2: 100.0% passed rate. Most failed actor: no failed actors found

github-tweaks's People

Contributors

ansereb avatar

Stargazers

Rustem Kamalov avatar

Watchers

 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.