A workflow that generates various statistics about my GitHub activity in the form of SVGs. Check out the original project (GitHub Stats Visualization) and idiotWu's more updated fork that served as the basis for some of the changes I made.
Dark | Light |
---|---|
EXCLUDE_PRIVATE_REPOS
optionClone this repository without the Git history and create a new GitHub repository for it.
git clone --depth 1 https://github.com/uncenter/gh-stats.git
Adjust settings/options via environment variables in .github/workflows/main.yml
to your liking (see Options). You'll need to generate a personal access token for the workflow to succeed:
repo
(full control of private repositories) and read:user
(read-only access to all user profile data).You'll then need to create a new repository secret for this token:
ACCESS_TOKEN
.Option | Description | Usage Example |
---|---|---|
EXCLUDED |
Exclude certain repositories by specifying their usernames and repository names as a comma-separated list. | someone/repository,another-person/another-repository |
EXCLUDED_LANGS |
Ignore certain languages by specifying them as a comma-separated list. Languages are not case-sensitive. | html,css |
EXCLUDE_FORKED_REPOS |
Show statistics only for "owned" repositories and exclude forks with contributions. | true |
EXCLUDE_PRIVATE_REPOS |
Show statistics for only public repositories and exclude your private ones. | true |
GENERATED_IMAGE_NAME |
Customize the output path for generated images. Make sure to end with the .svg extension and keep the {{ template }} and {{ theme }} variables somewhere in the name. There are three templates - overview , languages , community - and two themes - light and dark . |
{{ template }}-{{ theme }}.svg |
To use these options, add a new secret with the specified name and value to your repository's secrets, similar to how you added the access token secret. If you prefer not to use secrets, you can directly set the values in the workflow file by replacing VARIABLE_NAME: ${{ secrets.VARIABLE_NAME }}
with the desired value (e.g., VARIABLE_NAME: true
). For options that accept lists of values, provide the values as comma-separated strings within a single string. Make sure not to separate values with spaces though - apples,oranges
works but apples, oranges
will not.