Git Product home page Git Product logo

ghstat's Introduction

ghstat

Automatically plot total lines of code (LoC) written.

Full breakdown

Usage

Workflow

Requirements:

  • python3
    • e.g. uses: actions/setup-python@v2
  • secrets
    • a personal access token with scopes:
      • repo
      • read:user (optional)
      • gist (optional)
    • a gist ID which will store the generated graphs (optional)

Example:

name: ghstat
on:
  push:
  schedule:
    - cron: '0 0 * * *'  # every midnight
jobs:
  ghstat:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/setup-python@v2
    - uses: casperdcl/ghstat@v2
      with:
        github-token: ${{ secrets.GH_TOKEN }}
        gist-id: ${{ secrets.GIST_ID }}
        # user: casperdcl  # default inferred from github-token
        # author: 'Casper da Costa-Luis'  # for `git log --author`, default inferred
        # repos-incl: '' # space separated list (e.g. myuser/arepo myorg/arepo)
        # repos-skip: '' # space separated list (e.g. myuser/arepo myorg/arepo conda-forge)
        # lang-names: '' # space separated list (e.g. conf:INI cuh:Cuda)

Using a GIST_ID of 7f351ce61f01cfcfb5cfa53097954435, the result is visible at https://gist.github.com/casperdcl/7f351ce61f01cfcfb5cfa53097954435.

Running locally

Python and ${GH_TOKEN} are required; other env vars are optional.

python -m pip install -r requirements.txt
GH_TOKEN=... \
  AUTHOR=... \
  GH_USER=... \
  REPOS_INCL=... \
  REPOS_SKIP=... \
  GH_GIST_ID=... \
  LANG_NAMES=... \
  bash ghstat.sh

ghstat's People

Contributors

casperdcl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.