Skip to content

Generates a contribution graph that you can use for your profile!

License

Notifications You must be signed in to change notification settings

JBraunsmaJr/ContributionGraph

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

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

About

Generates a contribution graph that you can use for your profile!

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages