Skip to content

AaronBernabeu/gh-contributions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Contributions

This project retrieves contribution statistics from GitHub from the last 365 days for a given user and displays them in JSON format.

Installation

  1. Clone the project from the following URL:
git clone https://github.com/AaronBernabeu/gh-contributions.git
  1. Navigate to the project directory:
cd gh-contributions
  1. Install dependencies using go mod tidy:
go mod tidy
  1. Create a .env file based on the provided .env.dist. You can also set the required environment variables directly without creating a .env file. The required variables are:
  • GH_TOKEN: Your GitHub token.
  • GH_USERNAME: The username whose contributions you want to retrieve.

Usage

Run the program to display contribution statistics in JSON format:

go run cmd/gh-cli/main.go contributions

The output will be in the following format:

{
  "name": "Aaron Bernabeu",
  "today": 2,
  "week": 14,
  "month": 63,
  "year": 1324
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages