✨ Inspired by lang-box
📌 For more pinned-gist projects, check out: awesome-pinned-gists
This project analyzes your recent GitHub commits using the GitHub API and Linguist to display the percentage of each programming language used. It also calculates the number of lines added/removed per language.
-
Go to https://gist.github.com/ and create a new public gist.
-
Name the file (e.g., "Recent Coding Languages") and add a description (e.g., "💻 Recent GitHub Activity Languages").
-
Configure repository access:
-
For public repositories:Select "Public Repositories (read-only)"
-
For all repositories: Select "All repositories"
-
For specific repositories:
-
Choose "Only select repositories"
-
Select the desired repositories from the list
-
-
-
Configure permissions:
-
Repository permissions > Metadata: Read-only
- When selecting "Public Repositories (read-only)" no configuration is required.
-
Account permissions > Gists: Read and write
-
-
Generate and copy the token for use in the next steps.
Note: Ensure you save the token securely, as it won't be displayed again.
-
Fork this repository or create a new one using the template.
-
Ensure GitHub Actions are enabled for your repository.
-
Go to repository Settings > Security > Actions secrets and variables > Secrets, add the following environment variables:
GH_TOKEN
: The GitHub token generated above.
-
Go to repository Settings > Security > Actions secrets and variables > Variables, add the following environment variables:
GIST_ID
: The ID of your gist (e.g.,914dd217cecdc3bf27960be421c95850
from https://gist.github.com/liby/914dd217cecdc3bf27960be421c95850)
Follow GitHub's guide on pinning items to your profile to display your language stats.