fix: Added WakaTime info; Some tweaks
This commit is contained in:
parent
8ac60ed14f
commit
79d91bc512
35
README.md
35
README.md
@ -1,32 +1,41 @@
|
|||||||
# Dev Metrics in Readme
|
# Dev Metrics in Readme
|
||||||
|
|
||||||
[Wakatime](https://wakatime.com) Weekly Metrics on your Profile Readme:
|
[WakaTime](https://wakatime.com) Weekly Metrics on your Profile Readme:
|
||||||

|

|
||||||
|
|
||||||
|
## New to WakaTime
|
||||||
|
|
||||||
|
WakaTime gives you an idea of the time you really spent on coding. This helps you boost your productivity and competitive edge.
|
||||||
|
|
||||||
|
1. Head over to https://wakatime.com and create an account.
|
||||||
|
2. Get your WakaTime API Key from your [Account Settings in WakaTime](https://wakatime.com/settings/account).
|
||||||
|
3. Install the [WakaTime plugin](https://wakatime.com/plugins) in your favourite editor / IDE.
|
||||||
|
4. Paste in your API key to start the analysis.
|
||||||
|
|
||||||
## Update your Readme
|
## Update your Readme
|
||||||
|
|
||||||
Add a comment to your README like the follows
|
Add a comment to your `README.md` like this:
|
||||||
|
|
||||||
```md
|
```md
|
||||||
<!--START_SECTION:waka-->
|
<!--START_SECTION:waka-->
|
||||||
<!--END_SECTION:waka-->
|
<!--END_SECTION:waka-->
|
||||||
```
|
```
|
||||||
|
|
||||||
The lines will be our entrypoints for our metrics.
|
These lines will be our entry-points for the dev metrics.
|
||||||
|
|
||||||
## Using it
|
## Using it
|
||||||
|
|
||||||
- Get your Wakatime API Key from your [Account Settings in Wakatime](https://wakatime.com/settings/account) and save it as `WAKATIME_API_KEY = <your wakatime API Key>` in your Repository Secrets
|
Save your WakaTime API Key as `WAKATIME_API_KEY = <your wakatime API Key>` in your [Repository Secrets](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets).
|
||||||
|
|
||||||
That's it. The Action runs everyday at 00.00 UTC
|
That's it! The Action runs everyday at 00.00 UTC
|
||||||
|
|
||||||
### Profile Repository
|
### Profile Repository
|
||||||
|
|
||||||
If you're executing the workflow on your Profile Repository (`<username>/<username>`)
|
*If you're executing the workflow on your Profile Repository (`<username>/<username>`)*
|
||||||
|
|
||||||
**You wouldn't need an GitHub Access Token since GitHub Actions already makes one for you.**
|
> You wouldn't need an GitHub Access Token since GitHub Actions already makes one for you.
|
||||||
|
|
||||||
Here is a sample workflow file for you to get started,
|
Here is a sample workflow file for you to get started:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
name: Waka Readme
|
name: Waka Readme
|
||||||
@ -46,13 +55,13 @@ jobs:
|
|||||||
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Different Repository than Profile Repository
|
### Other Repository (not Profile)
|
||||||
|
|
||||||
if you're executing the workflow on another repo other than `<username>/<username>`
|
*If you're executing the workflow on another repo other than `<username>/<username>`*
|
||||||
|
|
||||||
- You'll need to get a GitHub Access Token with a `repo` scope and save it in the Repo Secrets `GH_TOKEN = <Your GitHub Access Token>`
|
You'll need to get a [GitHub Access Token](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) with a `repo` scope and save it in the Repo Secrets `GH_TOKEN = <Your GitHub Access Token>`
|
||||||
|
|
||||||
Here is Sample Worflow File for running it
|
Here is Sample Worflow File for running it:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
name: Waka Readme
|
name: Waka Readme
|
||||||
@ -71,5 +80,5 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN}}
|
GH_TOKEN: ${{ secrets.GH_TOKEN}}
|
||||||
USERNAME: <username> # optional, it will automaticially use the username that executing the workflow
|
USERNAME: <username> # optional, it will automatically use the username that executing the workflow
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user