Repository navigation
Conversation
Adds support for the public WakaTime badge SVG endpoints:
- /wakatime/user/{user}
- /wakatime/user/{user}/project/{project}
- /wakatime/github/{owner}/{repo}
The services extend BaseSvgScrapingService and include live tests against
the real WakaTime endpoints, as requested during review. This revives the
work originally proposed in badges#11790.
Closes badges#11722
Co-authored-by: Mohammad Ashif iqbal <129711879+ashif323@users.noreply.github.com>
Contributor
setchy
force-pushed
the
feat/wakatime-badges
branch
from
October 12, 2026 12:17
b26e0d0 to
29011c2
Compare
The user badge id is not listed on the share page; it is included in the badge snippet on your WakaTime profile. Use the WakaTime creator's public profile for the example and live test.
setchy
force-pushed
the
feat/wakatime-badges
branch
from
October 12, 2026 12:19
29011c2 to
45aebab
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumes the work from #11790 (closed due to inactivity), originally proposed by @ashif323, and closes #11722.
What changed
The original PR exposed
/wakatime/user/:idand/wakatime/project/:id. The latter no longer resolves upstream (https://wakatime.com/badge/project/{uuid}.svgreturns404). This version targets the endpoints WakaTime actually serves:/wakatime/user/{user}/wakatime/user/{user}/project/{project}/wakatime/github/{owner}/{repo}The services extend
BaseSvgScrapingService(as suggested by @PyvesB) and reuse_requestSvgwith a custom value matcher, so no API key is required.Live tests
@jNullj requested at least one live test per service. The tester now includes live tests for all three badge types (hitting the real WakaTime endpoints), plus mocked tests covering SVG parsing, unparseable responses, and 404s. The user badge live test uses the public profile of WakaTime's creator (@alan).
Attribution
This is based on @ashif323's original contribution in #11790. Their commits are credited with a
Co-authored-bytrailer in the commit.