Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update generated_by comment with code #538

Merged
merged 4 commits into from
Jun 12, 2024
Merged

update generated_by comment with code #538

merged 4 commits into from
Jun 12, 2024

Conversation

pelikhan
Copy link
Member

No description provided.

@@ -138,7 +142,7 @@ function appendGeneratedComment(
return prettifyMarkdown(
`<!-- genaiscript ${severity} ${code || ""} -->
${message}
${generatedByFooter(script, info)}`
${generatedByFooter(script, info, code)}`

Choose a reason for hiding this comment

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

The change in the function call generatedByFooter(script, info, code) seems to be significant, but there is no accompanying test change. Please ensure this change is covered by tests. 🧪

generated by pr-review-commit(missing_test)

@@ -138,7 +142,7 @@ function appendGeneratedComment(
return prettifyMarkdown(
`<!-- genaiscript ${severity} ${code || ""} -->
${message}
${generatedByFooter(script, info)}`
${generatedByFooter(script, info, code)}`

Choose a reason for hiding this comment

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

The function call to generatedByFooter in appendGeneratedComment now includes an extra argument code. Please ensure that this change doesn't affect other parts of the code where appendGeneratedComment is used. 🧐

generated by pr-review-commit func_call_change

info: GithubConnectionInfo,
code?: string
) {
return `\n\n> generated by ${link(script.id, info.runUrl)}${code ? ` \`${code}\` ` : ""}\n\n`

Choose a reason for hiding this comment

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

The string formatting in the return statement of generatedByFooter function seems a bit complex. Consider simplifying it or breaking it down for better readability. 📖

generated by pr-review-commit code_formatting

@pelikhan pelikhan marked this pull request as draft June 11, 2024 23:08
@pelikhan pelikhan marked this pull request as ready for review June 11, 2024 23:09
info: GithubConnectionInfo,
code?: string
) {
return `\n\n> generated by ${link(script.id, info.runUrl)}${code ? ` \`${code}\` ` : ""}\n\n`

Choose a reason for hiding this comment

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

The new parameter code in the function generatedByFooter is missing a documentation comment. It's important to document all parameters to improve code readability and maintainability. 😊

generated by pr-review-commit missing_param_doc

info: GithubConnectionInfo,
code?: string
) {
return `\n\n> generated by ${link(script.id, info.runUrl)}${code ? ` \`${code}\` ` : ""}\n\n`

Choose a reason for hiding this comment

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

There is a missing whitespace in the string concatenation. It should be ${code ? `${code}` : " "} to ensure proper formatting. 🧐

generated by pr-review-commit missing_whitespace

@@ -138,7 +142,7 @@ function appendGeneratedComment(
return prettifyMarkdown(
`<!-- genaiscript ${severity} ${code || ""} -->
${message}
${generatedByFooter(script, info)}`
${generatedByFooter(script, info, code)}`

Choose a reason for hiding this comment

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

The function appendGeneratedComment is missing the new parameter code when calling generatedByFooter. Please make sure to pass all required parameters to avoid unexpected behavior. 😇

generated by pr-review-commit missing_param

@pelikhan pelikhan merged commit 09d5d7d into main Jun 12, 2024
8 checks passed
@pelikhan pelikhan deleted the generate-by-code branch June 12, 2024 00:14
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.

None yet

1 participant