Open
Conversation
Contributor
darinkrauss
commented
Mar 18, 2026
- Refactor oauth
- Update TokenSource functions to return whether change occurred
- Add optional client error response parser
- Update Dexcom package accordingly
- Add mocks
- Refactor oauth - Update TokenSource functions to return whether change occurred - Add optional client error response parser - Update Dexcom package accordingly - Add mocks
There was a problem hiding this comment.
Pull request overview
Refactors OAuth token-source handling to expose whether token state changed, adds optional client-side error parsing, and updates Dexcom/OAuth clients and mocks to match.
Changes:
- Update
TokenSourceAPIs (UpdateToken/ExpireToken) to return(bool, error)and propagate conditional session updates. - Add
NewWithErrorParserconstructors to OAuth client/provider to support optional error-response parsing. - Update tests and add generated GoMock mocks for OAuth interfaces.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| private/plugin/abbott | Bumps the Abbott submodule reference. |
| oauth/work/mixin.go | Updates token update/expire flow to return change flags and handle missing token source. |
| oauth/token/source.go | Implements (bool, error) semantics for token refresh/expire and adds “no-op” behavior. |
| oauth/test/token_source.go | Updates the hand-rolled test stub to support (bool, error) outputs. |
| oauth/test/oauth_mocks.go | Adds generated GoMock mocks for OAuth interfaces. |
| oauth/provider/client/client.go | Adds provider constructor supporting optional error parser and wires it into oauth client creation. |
| oauth/oauth.go | Updates TokenSource interface signatures and adds go:generate directives for mocks. |
| oauth/client/client.go | Adds client constructor supporting optional error parser; adapts to new token-source signatures. |
| oauth/client/client_test.go | Updates tests to use the new (bool, error) token source outputs. |
| dexcom/fetch/runner.go | Updates Dexcom runner token handling to return change flags and conditionally persist session updates. |
| dexcom/client/client_test.go | Updates Dexcom client tests to use the new token source outputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Updates based upon feedback included in later PR. |
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.