Skip to content

Conversation

sab-i-dev
Copy link

Parameters styled as a list instead of text

Description

b-261120812

Parameters styled as a list instead of text
Copy link

google-cla bot commented Aug 22, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

Summary of Changes

Hello @sab-i-dev, 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 focuses on enhancing the readability of the runtimeOptions parameter's documentation within the src/v1/function-builder.ts file. The change involves reformatting the parameter descriptions from a numbered list to a more visually distinct bulleted list, along with adding extra line breaks to improve the overall clarity and presentation of the JSDoc comments.

Highlights

  • Documentation Formatting: The JSDoc for the runtimeOptions parameter in src/v1/function-builder.ts has been updated.
  • Readability Improvement: Numbered list items (e.g., "1. memory") have been replaced with bullet points (e.g., "• memory") and additional line breaks have been inserted for improved visual separation and clarity.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 updates the JSDoc for the runWith function to use a bulleted list for the runtimeOptions parameter, which is a good step for readability. My review provides a suggestion to use standard JSDoc list formatting and remove excessive whitespace to further improve clarity. Please also note that a similar runWith method exists on the FunctionBuilder class; for consistency, you might consider updating its documentation as well in a future change.

Comment on lines +268 to 288
*
*
* • `memory`: amount of memory to allocate to the function, possible values
* are: '128MB', '256MB', '512MB', '1GB', '2GB', '4GB', and '8GB'.
* 2. `timeoutSeconds`: timeout for the function in seconds, possible values are
*
* • `timeoutSeconds`: timeout for the function in seconds, possible values are
* 0 to 540.
* 3. `failurePolicy`: failure policy of the function, with boolean `true` being
*
* • `failurePolicy`: failure policy of the function, with boolean `true` being
* equivalent to providing an empty retry object.
* 4. `vpcConnector`: id of a VPC connector in same project and region.
* 5. `vpcConnectorEgressSettings`: when a vpcConnector is set, control which
*
* • `vpcConnector`: id of a VPC connector in same project and region.
*
* • `vpcConnectorEgressSettings`: when a vpcConnector is set, control which
* egress traffic is sent through the vpcConnector.
* 6. `serviceAccount`: Specific service account for the function.
* 7. `ingressSettings`: ingress settings for the function, which control where a HTTPS
*
* • `serviceAccount`: Specific service account for the function.
*
* • `ingressSettings`: ingress settings for the function, which control where a HTTPS
* function can be called from.
*
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While I appreciate the change to a list format, the implementation has a couple of issues. First, the excessive blank lines harm readability. Second, for JSDoc to correctly render a list, it's better to use hyphens (-) or asterisks (*) for list items instead of the bullet character (). Here's a suggestion that addresses both points for a more standard and readable format.

Suggested change
*
*
* `memory`: amount of memory to allocate to the function, possible values
* are: '128MB', '256MB', '512MB', '1GB', '2GB', '4GB', and '8GB'.
* 2. `timeoutSeconds`: timeout for the function in seconds, possible values are
*
* `timeoutSeconds`: timeout for the function in seconds, possible values are
* 0 to 540.
* 3. `failurePolicy`: failure policy of the function, with boolean `true` being
*
* `failurePolicy`: failure policy of the function, with boolean `true` being
* equivalent to providing an empty retry object.
* 4. `vpcConnector`: id of a VPC connector in same project and region.
* 5. `vpcConnectorEgressSettings`: when a vpcConnector is set, control which
*
* `vpcConnector`: id of a VPC connector in same project and region.
*
* `vpcConnectorEgressSettings`: when a vpcConnector is set, control which
* egress traffic is sent through the vpcConnector.
* 6. `serviceAccount`: Specific service account for the function.
* 7. `ingressSettings`: ingress settings for the function, which control where a HTTPS
*
* `serviceAccount`: Specific service account for the function.
*
* `ingressSettings`: ingress settings for the function, which control where a HTTPS
* function can be called from.
*
*
* - `memory`: amount of memory to allocate to the function, possible values
* are: '128MB', '256MB', '512MB', '1GB', '2GB', '4GB', and '8GB'.
* - `timeoutSeconds`: timeout for the function in seconds, possible values are
* 0 to 540.
* - `failurePolicy`: failure policy of the function, with boolean `true` being
* equivalent to providing an empty retry object.
* - `vpcConnector`: id of a VPC connector in same project and region.
* - `vpcConnectorEgressSettings`: when a vpcConnector is set, control which
* egress traffic is sent through the vpcConnector.
* - `serviceAccount`: Specific service account for the function.
* - `ingressSettings`: ingress settings for the function, which control where a HTTPS
* function can be called from.
*

Copy link
Author

Choose a reason for hiding this comment

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

without this changes the text will not be styled as a list, as it is now

Copy link
Contributor

Choose a reason for hiding this comment

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

Hyphens are the standard way to format a list in markdown, and should get rendered to bullet points in the reference docs. @egilmorez could you confirm?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's right, but honestly, the only way to be 100% sure what the docgen process will do is to run it. Let me give that a go later and get back to you :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Bad news: copying sabidev's changes into a local file and generating renders this result in staging: https://firebase.devsite.corp.google.com/docs/reference/functions/firebase-functions

firebase-functions.md

It's possible/likely that the "description" does not accept formatting directives like other fields; if we really want to pursue this fix, we need to ask Daniel to dig into the docgen code.

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.

3 participants