https://github.com/rushabh-v/show-your-contributions
An automated workflow that generates/updates an HTML doc to showcase your GitHub contributions.
https://github.com/rushabh-v/show-your-contributions
github-contributions github-pages github-pages-website
Last synced: about 1 year ago
JSON representation
An automated workflow that generates/updates an HTML doc to showcase your GitHub contributions.
- Host: GitHub
- URL: https://github.com/rushabh-v/show-your-contributions
- Owner: rushabh-v
- License: apache-2.0
- Created: 2020-09-20T09:06:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-26T19:37:12.000Z (about 2 years ago)
- Last Synced: 2025-03-28T02:47:09.433Z (about 1 year ago)
- Topics: github-contributions, github-pages, github-pages-website
- Language: Python
- Homepage:
- Size: 144 KB
- Stars: 35
- Watchers: 1
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Show-Your-Contributions
- An automated workflow that generates/updates your **GitHub page (Website)** and your **GitHub profile readme** to showcases your GitHub contributions.
- It will check your activities every day at `00:00 UTC` and will automatically update the `contributrions.html` if it finds any new Contributions.
See it working: [GitHub page](https://rushabh-v.github.io/contributions) | [GitHub profile readme](https://github.com/rushabh-v/)

## Usage Guide
1. Generate a `Personal access token` from `Account settings -> Developer settings -> Personal access tokens`.
2. Add a secret named `GIT_TOKEN` having your that `personal access token` from `repo settings -> secrets -> new secret` to the repo you want to add this workflow to.
3. Go to `Actions -> New workflow -> set up a workflow yourself`, paste the following code snippet there, replace `PR_THRESHOLD` with your desired threshold, commit, and it will add a document named `contributions.html` in that repo which will automatically get updated on your new contributions (On the first occurrence of `00:00 UTC` after your contribution).
- For profile readme setup, you can decide the `PR_THRESHOLD/minimum number of your PRs` for a repo to be included in your profile readme. That means you can set a number - `PR_THRESHOLD`, and all the repos to which you have made more than `PR_THRESHOLD` number of PRs will be added to the list of your contributions in your profile readme. **Any repo crossing the threshold will be automatically appended to your profile readme in the future.**
**Note**: Replace`` on line 20 with your desired threshold to set up profile readme, Leave otherwise.
```yml
name: update-my-contributions
on:
push:
paths: ".github/workflows/*"
schedule:
- cron: "0 0 * * *"
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- name: Get Updates
run: |
sudo apt install python3-setuptools
git clone https://github.com/rushabh-v/Show-Your-Contributions
cp -r ./Show-Your-Contributions/* ./
pip3 install pygithub
python3 fetch_contribs.py ${{ secrets.GIT_TOKEN }}
python3 generate_doc.py ${{ secrets.GIT_TOKEN }}
- name: Commit
uses: test-room-7/action-update-file@v1
with:
file-path: |
contributions.html
contributions.png
total_contribs
profile_readme.txt
commit-msg: Update resources
github-token: ${{ secrets.GIT_TOKEN }}
```
### Profile readme setup
After completing the above steps, paste the following line into your profile readme and replace `` with your username, and commit.
Or you can find your personalized line in the file named `profile_readme.txt` in your GitHub pages' repo.
```markdown
[](https://.github.io/contributions)
```