Post

Github Profile [3]: Commit Stat (feat.gist)

0

1

Prerequisites


[1] Github-Profile-1-README.md

[2] Github-Profile-2-GitHub-Stats

1. Fork the repo from productive-box.git

2. Activate Actions

  1. go to Actions tab and click the enabled bottom to activate.

3. Generate new public gist

  1. the title and contents do not matter. It will be overwritten anyway.
  2. ⚠️ click Create public gist
  3. copy the gist ID beforehand.

4. Generate token

  1. check repo, write:packages, and gist.
  2. ⚠️ please copy the token and save it somewhere else!!!
  3. set the Expiration to ‘No expiration’.

2

5. Edit the .yml file

  1. Open productive-box/.github/workflows/schedule.yml
  2. Change the user name.
1
2
3
4
...
steps:
  - name: Update gist
    uses: rebedy/productive-box@master

3

  1. And change the gist ID and the timezone.
    1. GIST_ID should be the ID you copied at 2)-3.
    2. TIMEZONE examples are in the README.md of this repository.
1
2
3
4
5
6
7
8
...
steps:
  - name: Update gist
    uses: rebedy/productive-box@master
    env:
      GH_TOKEN: ${{ secrets.GH_TOKEN }}
      GIST_ID: ...
      TIMEZONE: Asia/Seoul

6. Add new secret

  1. Settings of the repository > Secrets and variables > Actions > New repository secret
  2. Name: GH_TOKEN
  3. Secret: token you copied from 3)-2.

4

7. Fix the gist onto my GitHub profile

  1. On the top right corner of GitHub > Click your profile photo > Click Your profile.

5

  1. At the left top of the Pinned section, click Customize your pins.

    6

  2. Select up to six repositories and gists, combined > Click Save pins.

7

1
2
- (Optional) To change which items are included in the searchable list, next to `Show`, select or deselect **`Repositories`** and **`Gists`**.
- (Optional) To make it easier to find a specific item, in the `Filter repositories and gists` field, type the name of a user, organization, repository, or gist.

8. Update the gist

  1. It will update automatically by the Actions cycle. (1 hour)
  2. You can also update manually.
    1. Edit README.md or .yml file. It will update instantly.
    2. Go to Actions > Update git > press Run workflow button.

    8

References


This post is licensed under CC BY 4.0 by the author.