-
Notifications
You must be signed in to change notification settings - Fork 126
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
Add comments and documentation, replace angle brackets in CLI documentation #724
Conversation
@@ -40,7 +40,7 @@ See [configuration](/genaiscript/getting-started/configuration). | |||
npx genaiscript run <script> "**/*.md" "**/*.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTML entities should not be used in markdown files; replace '<' with '<' and '>' with '>'.
generated by pr-docs-review-commit
html_entity
@@ -62,7 +62,7 @@ npx genaiscript run <script> <files> --exclude-git-ignore | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTML entities should not be used in markdown files; replace '<' with '<' and '>' with '>'.
generated by pr-docs-review-commit
html_entity
## How to Run the Script | ||
|
||
To run this script, you'll first need to install the GenAIScript CLI. [Follow the installation guide here](https://microsoft.github.io/genaiscript/getting-started/installation). | ||
|
||
```shell | ||
```sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect code fence 'sh' should be 'shell' for consistency with the rest of the documentation.
generated by pr-docs-review-commit
incorrect_code_fence
}, | ||
}) | ||
|
||
const { format, build } = env.vars.build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect variable access, 'env.vars.build' should be 'env.vars' to access 'format' and 'build' variables correctly.
generated by pr-docs-review-commit
incorrect_variable_access
``` | ||
|
||
```sh | ||
genaiscript run cmt --vars "build=npm run build" "format=npm run format" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect flag format, use '--vars.build="npm run build"' and '--vars.format="npm run format"' instead of the current format.
generated by pr-docs-review-commit
incorrect_flag_format
The changes in the GIT_DIFF primarily involve the addition of comments to the code to improve readability and code understanding. The changes also include some small adjustments, such as changing the error message for unknown node types in There is no change in the functionality of the code. The modifications are solely for enhancing code documentation and readability, which is beneficial for code maintenance and collaboration. Therefore, I can confidently say, LGTM 🚀.
|
## How to Run the Script | ||
|
||
To run this script, you'll first need to install the GenAIScript CLI. [Follow the installation guide here](https://microsoft.github.io/genaiscript/getting-started/installation). | ||
|
||
```shell | ||
```sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace 'shell' with 'sh' to maintain consistency in code block language identifiers.
generated by pr-docs-review-commit
shell_to_sh
@@ -47,6 +47,9 @@ We can use [inline prompts](/genaiscript/reference/scripts/inline-prompts) to ma | |||
for (const file of files) { | |||
console.log(`processing ${file.filename}`) | |||
... add comments | |||
... format generated code (optional) -- keep things consistent | |||
... build generated -- let's make sure it's still valid code | |||
... check that only comments were changed -- LLM as judge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments in code snippets should be more descriptive and not use ellipsis '...'.
generated by pr-docs-review-commit
comment_guidance
) | ||
|
||
const modified = res.text?.includes("MODIFIED") | ||
console.log(`code modified, reverting...`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Console log statement 'code modified, reverting...' should be inside a conditional block to reflect the actual modification status.
generated by pr-docs-review-commit
log_without_condition
@@ -71,12 +71,14 @@ export function parseAnnotations(text: string): Diagnostic[] { | |||
* @returns A formatted GitHub Action command string. | |||
*/ | |||
export function convertDiagnosticToGitHubActionCommand(d: Diagnostic) { | |||
// Maps DiagnosticSeverity to GitHub Action severity strings. | |||
const sevMap: Record<DiagnosticSeverity, string> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon
generated by pr-review-commit
missing_semi
if (d.severity === "info") return `##[debug]${d.message} at ${d.filename}` | ||
else | ||
// Construct Azure DevOps command string with necessary details. | ||
return `##vso[task.logissue type=${d.severity};sourcepath=${d.filename};linenumber=${d.range[0][0]}]${d.message}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon
generated by pr-review-commit
missing_semi
const severities: Record<string, string> = { | ||
error: "CAUTION", | ||
warning: "WARNING", | ||
notice: "NOTE", | ||
} | ||
// Replace GitHub and Azure DevOps annotations with Markdown format. | ||
return text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon
generated by pr-review-commit
missing_semi
… directory utilities in TestHost
This pull request includes changes to add detailed comments and documentation across multiple files for clarity and understanding. It also replaces angle brackets with HTML entities in the CLI documentation to ensure proper rendering. These changes improve the readability and usability of the codebase.
<files...>
with<files...>
to improve the readability and escape HTML characters. 🎨copyPrompt
adding more comments and making it more understandable. 🏆