MartinsOnuoha / waka-box

πŸ“Š Update a pinned gist to contain your weekly WakaTime stats

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

waka-box

Update a pinned gist to contain your weekly WakaTime stats


πŸ“Œβœ¨ For more pinned-gist projects like this one, check out: https://github.com/matchai/awesome-pinned-gists

Setup

Prep work

  1. Create a new public GitHub Gist (https://gist.github.com/)
  2. Create a token with the gist scope and copy it. (https://github.com/settings/tokens/new)
  3. Create a WakaTime account (https://wakatime.com/signup)
  4. In your WakaTime profile settings (https://wakatime.com/settings/profile) ensure Display coding activity publicly and Display languages, editors, operating systems publicly are checked.
  5. In your account settings, copy the existing WakaTime API Key (https://wakatime.com/settings/api-key)

Project setup

  1. Fork this repo

  2. Edit the environment variable in .github/workflows/schedule.yml:

    • GIST_ID: The ID portion from your gist url: https://gist.github.com/matchai/6d5f84419863089a167387da62dd7081.
  3. Go to the repo Settings > Secrets

  4. Add the following environment variables:

    • GH_TOKEN: The GitHub token generated above.
    • WAKATIME_API_KEY: The API key for your WakaTime account.

Finally Enable the workflow under actions tab, because workflows are disabled by default for forked repositories. After this is done, you won't see the Gist updated yet, until the Workflow runs.

Trigger the workflow

I have added an on event in the workflow to trigger it when a Pull Request happens, by default it is only triggered at 00:00 UTC every day. You can update this readme, and choose "Create a new branch for this commit" Then merge the PR and check your Pinned Gist.

About

πŸ“Š Update a pinned gist to contain your weekly WakaTime stats

License:ISC License


Languages

Language:JavaScript 98.3%Language:Shell 1.7%