Skip to content

fix: updating jsDocs for understanding publicApiKey usage#123

Closed
jaredwray wants to merge 1 commit intomainfrom
fix-updating-jsDocs-for-understanding-publicApiKey-usage
Closed

fix: updating jsDocs for understanding publicApiKey usage#123
jaredwray wants to merge 1 commit intomainfrom
fix-updating-jsDocs-for-understanding-publicApiKey-usage

Conversation

@jaredwray
Copy link
Contributor

Please check if the PR fulfills these requirements

  • Followed the Contributing guidelines and Code of Conduct
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
fix: updating jsDocs for understanding publicApiKey usage

@gemini-code-assist
Copy link

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 enhances the documentation for the HyphenOptions interface by adding clarifying JSDoc comments. The primary goal is to improve understanding of how API keys are managed and passed to various integrated services, ensuring developers clearly understand that top-level API keys are used, preventing redundant or incorrect key specifications in nested configurations.

Highlights

  • JSDoc Clarity for API Keys: Updated JSDoc comments within the HyphenOptions interface to explicitly state that publicApiKey or apiKey parameters are excluded from nested service options (Toggle, NetInfo, Link) because they are provided at the top level.

🧠 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
  • src/hyphen.ts
    • Added JSDoc comments to toggle option clarifying publicApiKey exclusion.
    • Added JSDoc comments to netInfo option clarifying apiKey exclusion.
    • Added JSDoc comments to link option clarifying apiKey exclusion.
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.

@jaredwray jaredwray closed this Mar 4, 2026
@jaredwray jaredwray deleted the fix-updating-jsDocs-for-understanding-publicApiKey-usage branch March 4, 2026 19:22
Copy link

@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 updates the JSDoc comments for the HyphenOptions type to clarify why API key properties are omitted from nested service options. The changes are a good step towards better documentation. I've added a few suggestions to further improve the clarity and precision of these comments by specifying that the keys should be provided on the HyphenOptions object, removing ambiguity from the term 'top level'.

apiKey?: string;
/**
* Options for the Toggle service.
* Excludes `publicApiKey` as it's provided at the top level.

Choose a reason for hiding this comment

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

medium

The phrasing Excludes... is a bit awkward as a sentence fragment. To improve clarity and remove the ambiguity of 'top level', I suggest rephrasing to directly state where the publicApiKey should be provided.

Suggested change
* Excludes `publicApiKey` as it's provided at the top level.
* `publicApiKey` is provided on the top-level `HyphenOptions` object.

toggle?: Omit<ToggleOptions, "publicApiKey">;
/**
* Options for the NetInfo service.
* Excludes `apiKey` as it's provided at the top level.

Choose a reason for hiding this comment

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

medium

The phrasing Excludes... is a bit awkward as a sentence fragment. To improve clarity and remove the ambiguity of 'top level', I suggest rephrasing to directly state where the apiKey should be provided.

Suggested change
* Excludes `apiKey` as it's provided at the top level.
* `apiKey` is provided on the top-level `HyphenOptions` object.

netInfo?: Omit<NetInfoOptions, "apiKey">;
/**
* Options for the Link service.
* Excludes `apiKey` as it's provided at the top level.

Choose a reason for hiding this comment

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

medium

The phrasing Excludes... is a bit awkward as a sentence fragment. To improve clarity and remove the ambiguity of 'top level', I suggest rephrasing to directly state where the apiKey should be provided.

Suggested change
* Excludes `apiKey` as it's provided at the top level.
* `apiKey` is provided on the top-level `HyphenOptions` object.

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (a313d9c) to head (6dc6ebd).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #123   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          477       477           
  Branches        99        95    -4     
=========================================
  Hits           477       477           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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