Add Hammerhead Karoo provider - #39
Merged
Merged
Conversation
Implements a new provider for the Hammerhead Karoo cycling computer API (https://api.hammerhead.io/v1/docs). The provider supports OAuth 2.0 authorization code flow with rotating refresh tokens and exposes activity listing, single activity lookup, and FIT file download via the Exporter interface. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
Resolves goconst lint error for repeated "1.1" string literal. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
Fixes GO-2026-4971, GO-2026-4918 (go1.26.3), GO-2026-5039, GO-2026-5037 (go1.26.4), and GO-2026-5856 (go1.26.5) reachable via zwift and strava code. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
==========================================
+ Coverage 81.94% 83.57% +1.63%
==========================================
Files 35 40 +5
Lines 1429 1583 +154
==========================================
+ Hits 1171 1323 +152
- Misses 144 145 +1
- Partials 114 115 +1
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Add tests for: pagination truncation when spec.Total is exceeded, missing access token errors on Activity and File, File HTTP transport error, Export error propagation from File, and url.Parse failure via invalid API URL. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
Bumps the go_modules group with 1 update in the / directory: [golang.org/x/net](https://github.com/golang/net). Updates `golang.org/x/net` from 0.53.0 to 0.55.0 - [Commits](golang/net@v0.53.0...v0.55.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.55.0 dependency-type: indirect dependency-group: go_modules ... Signed-off-by: dependabot[bot] <[email protected]>
Mirrors the Strava client's Auth.Refresh, allowing callers to exchange an existing refresh token for a new access/refresh token pair.
Consistent with ActivityTypeEMountainBike — E (electric) prefix followed by a capitalized noun. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
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.
Summary
hammerheadpackage implementing a client for the Hammerhead Karoo APIactivity:readscope)activity.Exporterinterface viaActivitiesService: list activities, fetch a single activity, and download the original FIT filegoconstlint failure instrava/encoding.go(repeated"1.1"literal extracted asgpxVersionconstant)godirective from1.26.2to1.26.5to resolve five stdlib CVEs (GO-2026-4971, GO-2026-4918, GO-2026-5039, GO-2026-5037, GO-2026-5856) reachable via zwift and strava codeNew files
hammerhead/model.go—Fault,ActivitySummary,Activity,ActivitiesPagetypeshammerhead/hammerhead.go—Client,Endpoint(), OAuth helpershammerhead/hammerhead_with.go—NewClientand allWith*option functionshammerhead/activities.go—ActivitiesServicewithActivities,Activity,File,ExportGenerated by Claude Code