Skip to content

Refactor oura package layout#923

Open
darinkrauss wants to merge 1 commit intodarin/refactor-workfrom
darin/refactor-oura
Open

Refactor oura package layout#923
darinkrauss wants to merge 1 commit intodarin/refactor-workfrom
darin/refactor-oura

Conversation

@darinkrauss
Copy link
Copy Markdown
Contributor

  • Refactor oura package layout
  • Move data structures to top-level oura package
  • Remove unnecessary GroupID and SerialID from revoke work
  • Add cumulative oura processor dependencies

- Refactor oura package layout
- Move data structures to top-level oura package
- Remove unnecessary GroupID and SerialID from revoke work
- Add cumulative oura processor dependencies
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the Oura integration package layout by moving shared client APIs and data structures into the top-level oura package, and updating work processors/providers to use the new locations.

Changes:

  • Move Oura client interface and subscription/personal-info structs to oura/oura.go and update client implementation signatures accordingly.
  • Reorganize work processor packages (oura/data/work/..., oura/webhook/work/..., oura/users/work/...) and update imports/processor dependencies.
  • Remove the old oura/work/users helpers and adjust revoke work creation logic.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
oura/work/work.go Removes old oura/work client interface; adds provider-session group ID helper.
oura/work/users/users.go Deletes old users work ID helpers.
oura/work/processors/processors.go Moves processor-factory wiring into processors package; adds dependency validation and updates imports to new layout.
oura/webhook/work/subscribe/processor.go Switches dependency type from old work client interface to oura.Client.
oura/webhook/webhook.go Removes subscription structs from webhook package (now in oura).
oura/users/work/revoke/processor.go Updates to oura.Client and removes GroupID/SerialID from revoke work creation.
oura/provider/provider.go Updates references to new work packages and group ID helpers.
oura/oura.go Adds Client interface + subscription/personal-info structs at top-level oura.
oura/data/work/work.go Renames package to work (import path oura/data/work).
oura/data/work/setup/processor.go Updates to oura.Client and new work package paths.
oura/data/work/historic/processor.go Updates to oura.Client and new work package paths.
oura/data/work/event/processor.go Updates to oura.Client and new work package paths.
oura/data/data.go Deletes old PersonalInfo definition (now in oura).
oura/client/client.go Updates method signatures/types to use new top-level oura structs and times.TimeRange.
Comments suppressed due to low confidence (1)

oura/users/work/revoke/processor.go:114

  • work.Create validation requires non-empty groupId and serialId (see work/work.go Create.Validate). This work creator no longer sets either field, so creating revoke work will fail validation in the work store/client. Please either restore GroupID/SerialID for revoke work (e.g., derived from providerSession.ID) or relax the validation rules if they are truly optional for this work type (but that change would need to be applied consistently across the work system).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@darinkrauss
Copy link
Copy Markdown
Contributor Author

Updates based upon feedback included in later PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants