So I wanted to add the Wakatime Section in my Github profile README.md but it always drop the same error. Firstly, he doesn't work as I would like to because my flags (into the .yml file) aren't working, here is my .yml file :
name: Waka Readme
on:
workflow_dispatch:
schedule:
# Runs at 05:00PM UTC = 00:00AM +7
- cron: '0 */4 * * *'
jobs:
update-readme:
name: Update this repo's README
runs-on: ubuntu-latest
steps:
- uses: anmol098/waka-readme-stats@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
SHOW_LINES_OF_CODE: "True"
SHOW_PROFILE_VIEWS: "False"
SHOW_COMMIT: "False"
SHOW_EDITORS: "True"
SHOW_DAYS_OF_WEEK: "False"
SHOW_LANGUAGE: "True"
SHOW_OS: "True"
SHOW_PROJECTS: "False"
SHOW_TIMEZONE: "False"
SHOW_LANGUAGE_PER_REPO: "False"
SHOW_SHORT_INFO: "False"
SHOW_LOC_CHART: "False"
LOCALE: en
You can find the gh repo here : https://github.com/anmol098/waka-readme-stats
Here is the error that I'm having when I run the .yml file :
Traceback (most recent call last):
Exception Occurred Query failed to run by returning code of 401.
File "/main.py", line 497, in <module>
{
user_data = run_query(userInfoQuery) # Execute the query
viewer {
File "/main.py", line 156, in run_query
login
raise Exception("Query failed to run by returning code of {}. {}".format(request.status_code, query))
email
Exception: Query failed to run by returning code of 401.
id
{
}
viewer {
}
login
email
id
}
}
PS: my Wakatime profile is working, I have no problem with the API Key, you can even find my stats here : https://wakatime.com/api/v1/users/branlito/stats/last_7_days
You'll need a GitHub API Token with repo and user scope from https://github.com/settings/tokens if you're running the action to get commit metrics