Skip to content

Integrate strava api integration & render activities data#6

Merged
yuler merged 3 commits intomainfrom
strava
Mar 17, 2026
Merged

Integrate strava api integration & render activities data#6
yuler merged 3 commits intomainfrom
strava

Conversation

@yuler
Copy link
Owner

@yuler yuler commented Mar 17, 2026

This PR adds Strava API integration to fetch and sync athlete activities.

Key changes:

  • Added src/utils/strava.ts for Strava API calls (with support for both Astro and Node environments).
  • Added scripts/sync-strava.mjs to fetch and cache activities in data/strava/.
  • Added scripts/test-strava.mjs for manual testing.
  • Updated package.json with strava:test and strava:sync scripts.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 introduces comprehensive Strava API integration, enabling the fetching and local caching of athlete activities. It includes new utility scripts for syncing and testing Strava data, as well as a script to export blog posts to PDF. The changes enhance the project's capabilities by automating data retrieval and content generation, alongside updating necessary development dependencies.

Highlights

  • Strava API Integration: Added src/utils/strava.ts to handle Strava API calls, supporting both Astro and Node environments for fetching athlete activities and detailed activity information.
  • Activity Syncing Script: Introduced scripts/sync-strava.mjs to automate fetching and caching Strava activities into the data/strava/ directory, including detailed data for the latest activity.
  • Strava Testing Script: Created scripts/test-strava.mjs for manual verification of the Strava API integration, displaying a summary of fetched activities.
  • New Utility Scripts: Added scripts/export-post-pdf.mjs to export blog posts as PDFs using Playwright, and updated package.json with new strava:test, strava:sync, export:pdf, and commit commands.
  • Dependency Updates: Updated package.json and pnpm-lock.yaml to include new development dependencies such as playwright, sharp, and tsx to support the new functionalities.
  • New Content Draft: Added a new draft blog post src/content/posts/2026/vibe-coding.mdx exploring the concept of 'Vibe-coding' and related tools.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .gitignore
    • Added pdfs/ to the ignore list to exclude generated PDF files from version control.
  • package.json
    • Added export:pdf script for exporting posts as PDFs.
    • Added strava:test script for testing Strava API integration.
    • Added strava:sync script for syncing Strava activities.
    • Added commit script.
    • Added playwright, sharp, and tsx to dev dependencies.
  • pnpm-lock.yaml
    • Updated dependency resolutions for @astrojs/mdx, @tailwindcss/vite, and astro to include tsx.
    • Added playwright, sharp, and tsx dependencies.
    • Updated esbuild related packages to version 0.27.4.
    • Added get-tsconfig and resolve-pkg-maps dependencies.
  • scripts/export-post-pdf.mjs
    • Added a script to export blog posts to PDF, featuring post selection, local server, and Playwright for rendering.
  • scripts/sync-strava.mjs
    • Added a script to synchronize Strava activities and store them as JSON files.
  • scripts/test-strava.mjs
    • Added a script to test the Strava API integration and display fetched activities.
  • src/content/posts/2026/vibe-coding.mdx
    • Added a new draft post exploring 'Vibe-coding' concepts, tools, and projects.
  • src/utils/strava.ts
    • Added a utility for Strava API integration, including token refresh and activity fetching functions.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces Strava API integration, scripts for syncing and testing activities, a new script for exporting posts to PDF, and a draft blog post. The overall structure is good, but I've identified a critical security vulnerability in the Strava utility file where API secrets could be exposed to the client. I've provided a suggestion to enforce server-side execution for this module. Additionally, I've left a couple of medium-severity comments on the new scripts to improve error handling and code consistency. Addressing the security issue is crucial before merging.

@yuler yuler marked this pull request as ready for review March 17, 2026 16:45
@yuler yuler changed the title feat: strava api integration & activities sync Integrate strava api integration & render activities data Mar 17, 2026
@yuler yuler merged commit ba20363 into main Mar 17, 2026
1 check passed
@yuler yuler deleted the strava branch March 17, 2026 16:48
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.

1 participant