fix for oauth and /health-data to handle exercise sets.#674
Conversation
Summary of ChangesHello @CodeWithCJ, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a fix for OAuth authentication argument handling and significantly enhances the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors OAuth calls to use an object for parameters, which improves readability, and adds functionality to handle exercise sets from mobile health data. While the exercise set handling is implemented in processHealthData, it seems to have been missed in the processMobileHealthData function, which is a key area for this feature. The other changes are primarily stylistic and improve code formatting.
| { | ||
| exercise_id: exercise.id, | ||
| duration_minutes: duration ? duration / 60 : 0, | ||
| calories_burned: caloriesBurned, | ||
| entry_date: parsedDate, | ||
| notes: `Source: ${source}, Activity Type: ${activityType}`, | ||
| distance: distance, | ||
| // Add other exercise-related fields from mobileHealthData if available | ||
| }, |
There was a problem hiding this comment.
The processMobileHealthData function handles ExerciseSession and Workout types, but it doesn't pass the sets data to createExerciseEntry. This is inconsistent with the changes in processHealthData and the goal of this PR to handle exercise sets from mobile. Please add the sets property to the object passed to createExerciseEntry to ensure exercise sets from mobile are processed correctly.
| { | |
| exercise_id: exercise.id, | |
| duration_minutes: duration ? duration / 60 : 0, | |
| calories_burned: caloriesBurned, | |
| entry_date: parsedDate, | |
| notes: `Source: ${source}, Activity Type: ${activityType}`, | |
| distance: distance, | |
| // Add other exercise-related fields from mobileHealthData if available | |
| }, | |
| { | |
| exercise_id: exercise.id, | |
| duration_minutes: duration ? duration / 60 : 0, | |
| calories_burned: caloriesBurned, | |
| entry_date: parsedDate, | |
| notes: `Source: ${source}, Activity Type: ${activityType}`, | |
| distance: distance, | |
| sets: dataEntry.sets || null, | |
| // Add other exercise-related fields from mobileHealthData if available | |
| }, |
fix for oauth and /health-data exercise set from mobile.
#673