Skip to content
calendar

GitHub Action

badger23-contribution-graph

v1 Latest version

badger23-contribution-graph

calendar

badger23-contribution-graph

Generates a contribution graph that you can use on your github profile

Installation

Copy and paste the following snippet into your .yml file.

              

- name: badger23-contribution-graph

uses: JBraunsmaJr/ContributionGraph@v1

Learn more about this action in JBraunsmaJr/ContributionGraph

Choose a version

Contribution Graph Action

Github action for generating a contribution graph for your github profile!

I took inspiration from the repositories that used heroku. However, when I noticed the rate limiting problem I figured... how often do these stats need to be updated?

If anything... once perday... right? Alleviates potential rate-limiting!

contribution graph example

Usage

I'm new to creating github actions, so bear with me. If there is an easier way of doing things please let me know!

# run every day at midnight
on:
   schedule:
     - cron: "0 0 * * *"
# this will generate the contribution graph into an 'images' folder
- uses: JBraunsmaJr/contributiongraph@v1
  with:
     token: ${{ secrets.GRAPH_QL }}
     viewby: day
     farback: 31

# simply update anything within the images folder that got updated...
- uses: stefanzweifel/git-auto-commit-action@v4
  with:
    commit_message: Updating Contribution Graph
    file_pattern: images/*

Parameter Info

token

This needs to follow github's requirements for accessing the GraphQL api. Then stored as a secret in your repository


viewby

Value Description
day the graph displays contributions by day
week the graph displays contributions by week
month the graph displays contributions by month

farback

This behavior is tied to the viewby parameter.

For instance:

farback: 12

viewby: week

This means 12 weeks back from today.

Similarly if viewby was set to days, it'd be 12 days back from today.

The only limitation is that Github limits the query to be less than 1 year.

title

The text to appear at the top of the graph