diff --git a/.github/workflows/gemini-pr-review.yml b/.github/workflows/gemini-pr-review.yml index a93b70b2..ff3981ac 100644 --- a/.github/workflows/gemini-pr-review.yml +++ b/.github/workflows/gemini-pr-review.yml @@ -256,7 +256,7 @@ jobs: This is a strict requirement as the GitHub (and other SCM's) API won't allow comments on parts of code files that are not included in the diff hunks. 8. Code Suggestions in Review Comments: - * Succintness: Aim to make code suggestions succinct, unless necessary. Larger code suggestions tend to be + * Succinctness: Aim to make code suggestions succinct, unless necessary. Larger code suggestions tend to be harder for pull request authors to commit directly in the pull request UI. * Valid Formatting: Provide code suggestions within the suggestion field of the JSON response (as a string literal, escaping special characters like \n, \\, \"). Do not include markdown code blocks in the suggestion field. @@ -387,7 +387,7 @@ jobs: 1. Creating a pending review: Use the mcp__github__create_pending_pull_request_review to create a Pending Pull Request Review. 2. Adding review comments: - 2.1 Use the mcp__github__add_comment_to_pending_review to add comments to the Pending Pull Request Review. Inline comments are preffered whenever possible, so repeat this step, calling mcp__github__add_comment_to_pending_review, as needed. All comments about specific lines of code should use inline comments. It is preferred to use code suggestions when possible, which include a code block that is labeled "suggestion", which contains what the new code should be. All comments should also have a severity. They syntax is: + 2.1 Use the mcp__github__add_comment_to_pending_review to add comments to the Pending Pull Request Review. Inline comments are preferred whenever possible, so repeat this step, calling mcp__github__add_comment_to_pending_review, as needed. All comments about specific lines of code should use inline comments. It is preferred to use code suggestions when possible, which include a code block that is labeled "suggestion", which contains what the new code should be. All comments should also have a severity. They syntax is: Normal Comment Syntax: {{SEVERITY}} {{COMMENT_TEXT}} diff --git a/action.yml b/action.yml index c3a0b2f5..1550f2b4 100644 --- a/action.yml +++ b/action.yml @@ -140,7 +140,15 @@ runs: id: 'gemini_run' run: |- set -e + + # Unset GEMINI_API_KEY if empty + if [ -z "${GEMINI_API_KEY}" ]; then + unset GEMINI_API_KEY + fi + + # Run Gemini CLI with the provided prompt GEMINI_RESPONSE=$(gemini --yolo --prompt "${PROMPT}") + # Set the captured response as a step output, supporting multiline echo "gemini_response<> "${GITHUB_OUTPUT}" echo "${GEMINI_RESPONSE}" >> "${GITHUB_OUTPUT}" diff --git a/examples/workflows/pr-review/gemini-pr-review.yml b/examples/workflows/pr-review/gemini-pr-review.yml index 02d1a253..652e355b 100644 --- a/examples/workflows/pr-review/gemini-pr-review.yml +++ b/examples/workflows/pr-review/gemini-pr-review.yml @@ -250,7 +250,7 @@ jobs: This is a strict requirement as the GitHub (and other SCM's) API won't allow comments on parts of code files that are not included in the diff hunks. 8. Code Suggestions in Review Comments: - * Succintness: Aim to make code suggestions succinct, unless necessary. Larger code suggestions tend to be + * Succinctness: Aim to make code suggestions succinct, unless necessary. Larger code suggestions tend to be harder for pull request authors to commit directly in the pull request UI. * Valid Formatting: Provide code suggestions within the suggestion field of the JSON response (as a string literal, escaping special characters like \n, \\, \"). Do not include markdown code blocks in the suggestion field. @@ -381,7 +381,7 @@ jobs: 1. Creating a pending review: Use the mcp__github__create_pending_pull_request_review to create a Pending Pull Request Review. 2. Adding review comments: - 2.1 Use the mcp__github__add_comment_to_pending_review to add comments to the Pending Pull Request Review. Inline comments are preffered whenever possible, so repeat this step, calling mcp__github__add_comment_to_pending_review, as needed. All comments about specific lines of code should use inline comments. It is preferred to use code suggestions when possible, which include a code block that is labeled "suggestion", which contains what the new code should be. All comments should also have a severity. They syntax is: + 2.1 Use the mcp__github__add_comment_to_pending_review to add comments to the Pending Pull Request Review. Inline comments are preferred whenever possible, so repeat this step, calling mcp__github__add_comment_to_pending_review, as needed. All comments about specific lines of code should use inline comments. It is preferred to use code suggestions when possible, which include a code block that is labeled "suggestion", which contains what the new code should be. All comments should also have a severity. They syntax is: Normal Comment Syntax: {{SEVERITY}} {{COMMENT_TEXT}} diff --git a/package-lock.json b/package-lock.json index 85490630..8dd20749 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "run-gemini-cli", - "version": "0.1.5", + "version": "0.1.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "run-gemini-cli", - "version": "0.1.5", + "version": "0.1.6", "license": "Apache-2.0", "devDependencies": { "@google-github-actions/actions-utils": "^0.8.8" diff --git a/package.json b/package.json index e801c3e6..3f41df82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "run-gemini-cli", - "version": "0.1.5", + "version": "0.1.6", "description": "This works with our versioning tools, this is NOT an NPM repo", "scripts": { "build": "echo \"No build required for composite action\"",