Skip to content

Commit c95eb4d

Browse files
committed
fix: improve Gemini CLI workflow parameter handling
This commit addresses the "[object Object]" error by improving how workflow parameters are handled: 1. Set default value 'latest' for gemini_cli_version to prevent undefined variable issues 2. Fix fromJSON() calls by using string 'false' instead of boolean false to prevent JSON parsing errors 3. Keep configuration checks to provide better error messages when API keys are missing These changes ensure that optional parameters are properly handled even when repository variables are not configured, preventing the cryptic error that occurred in the previous workflow runs.
1 parent 4079a60 commit c95eb4d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/gemini-invoke.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}'
7070
google_api_key: '${{ secrets.GOOGLE_API_KEY }}'
7171
use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}'
72-
gemini_debug: '${{ fromJSON(vars.DEBUG || vars.ACTIONS_STEP_DEBUG || false) }}'
72+
gemini_debug: '${{ fromJSON(vars.DEBUG || vars.ACTIONS_STEP_DEBUG || 'false') }}'
7373
gemini_model: '${{ vars.GEMINI_MODEL }}'
7474
settings: |-
7575
{

.github/workflows/gemini-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
REPOSITORY: '${{ github.repository }}'
6565
ADDITIONAL_CONTEXT: '${{ inputs.additional_context }}'
6666
with:
67-
gemini_cli_version: '${{ vars.GEMINI_CLI_VERSION }}'
67+
gemini_cli_version: '${{ vars.GEMINI_CLI_VERSION || 'latest' }}'
6868
gcp_workload_identity_provider: '${{ vars.GCP_WIF_PROVIDER }}'
6969
gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}'
7070
gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}'
@@ -73,7 +73,7 @@ jobs:
7373
use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}'
7474
google_api_key: '${{ secrets.GOOGLE_API_KEY }}'
7575
use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}'
76-
gemini_debug: '${{ fromJSON(vars.DEBUG || vars.ACTIONS_STEP_DEBUG || false) }}'
76+
gemini_debug: '${{ fromJSON(vars.DEBUG || vars.ACTIONS_STEP_DEBUG || 'false') }}'
7777
settings: |-
7878
{
7979
"maxSessionTurns": 25,

.github/workflows/gemini-triage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
ISSUE_BODY: '${{ github.event.issue.body }}'
7474
AVAILABLE_LABELS: '${{ steps.get_labels.outputs.available_labels }}'
7575
with:
76-
gemini_cli_version: '${{ vars.GEMINI_CLI_VERSION }}'
76+
gemini_cli_version: '${{ vars.GEMINI_CLI_VERSION || 'latest' }}'
7777
gcp_workload_identity_provider: '${{ vars.GCP_WIF_PROVIDER }}'
7878
gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}'
7979
gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}'
@@ -82,7 +82,7 @@ jobs:
8282
use_vertex_ai: '${{ vars.GOOGLE_GENAI_USE_VERTEXAI }}'
8383
google_api_key: '${{ secrets.GOOGLE_API_KEY }}'
8484
use_gemini_code_assist: '${{ vars.GOOGLE_GENAI_USE_GCA }}'
85-
gemini_debug: '${{ fromJSON(vars.DEBUG || vars.ACTIONS_STEP_DEBUG || false) }}'
85+
gemini_debug: '${{ fromJSON(vars.DEBUG || vars.ACTIONS_STEP_DEBUG || 'false') }}'
8686
settings: |-
8787
{
8888
"maxSessionTurns": 25,

0 commit comments

Comments
 (0)