This automation will make daily commits to ensure your GitHub heatmap stays green. Follow the steps below to set it up:
-
Fork the Repository: Start by forking this repository to your GitHub account.
-
Create a Fine-Grained Token:
- Go to your GitHub settings and create a fine-grained personal access token with
Contents
permission set toread and write
.
- Go to your GitHub settings and create a fine-grained personal access token with
-
Add the API Key to Repository Secrets:
- Navigate to the repository settings in your forked repo.
- Add the API key as a repository secret with the name
API_KEY
.
-
Modify the
greener.py
Script:- The script currently encounters a
401 Unauthorized
error when running in GitHub Actions due to the API key not being associated with the correct username. - To fix this, update line 10 of
greener.py
to:username = "your_github_username"
- Replace
"your_github_username"
with your actual GitHub username.
- The script currently encounters a
-
Enable the Workflow:
- Go to the
Actions
tab in your repository and enable the workflow.
- Go to the
Once set up, the workflow will run daily, making a commit to keep your GitHub heatmap green.