Git Product home page Git Product logo

githubstatsgen's Introduction

Github Stats Gen

Github action to generate language and commit stats for a user.

Requirements

To add this action to a repository, a workflow file has to be created. In addition, an access token is required to fetch private repository data and work around strict rate limits. Store it in the repository's action secrets as ACCESS_TOKEN.

Example workflow

To generate stats, add a workflow file in the /.github/workflows/ directory.

name: Generate Stats
on:
  schedule:
    - cron: "0 0 * * *"

jobs:
  gen-file:
    runs-on: ubuntu-latest
    name: Generate Stats Cards
    permissions:
      contents: write
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Generate Lang Stats
        uses: JannikNickel/GithubStatsGen@v1
        with:
          access_token: ${{ secrets.ACCESS_TOKEN }}
          username: "YOUR_USERNAME"
          output_file: "OUTPUT_FILE.svg"
          type: "lang_comp"
          theme: "dark"
          include_private: true
          include_forks: false
          ignored_repos: "Repo0,Repo1"
          timezone: "Etc/Utc"
          language_limit: 7

      - name: Commit + push
        run: |
          git config --global user.name "github-actions[bot]"
          git config --global user.email "github-actions[bot]@users.noreply.github.com"
          git add .
          git commit -m "Update stats" || echo "No changes to commit"
          git push

Action inputs

Name Values Required Description
username string ✔️ Github username of the user to generate stats for
output_file string ✔️ Output file path/name relative to the root of the repository
type commit_times/commit_days/lang_list/lang_comp ✔️ Type of card to generate
theme dark/light Theme to use
include_forks true/false Whether to include forked repositories or not
include_private true/false Whether to include private repositories or not. An access token is required to access private repos!
ignored_repos Repo1,Repo2,Repo3 List of comma separated repository names to ignore in the statistics
timezone Etc/Utc Local timezone of the user from the tz database
language_limit int The maximum amount of languages to show in the language cards

githubstatsgen's People

Contributors

janniknickel avatar dependabot[bot] avatar

Watchers

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