Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/gemini-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,13 @@ jobs:
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
RAW_COMMENT: ${{ github.event.comment.body || '' }}
run: |
# 1. Extract additional context from the comment (if any)
# Extract additional context from the comment (if any)
ADDITIONAL_CONTEXT="None"
if [[ "$RAW_COMMENT" == *"@gemini-cli /review"* ]]; then
ADDITIONAL_CONTEXT=$(echo "$RAW_COMMENT" | sed 's/^@gemini-cli \/review//' | xargs)
[ -z "$ADDITIONAL_CONTEXT" ] && ADDITIONAL_CONTEXT="None"
fi

# Export variables so envsubst can access them
export REPOSITORY PULL_REQUEST_NUMBER ADDITIONAL_CONTEXT

# 2. Safely read files and set GitHub Outputs
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The ADDITIONAL_CONTEXT variable is set within the run script but is no longer explicitly exported. For envsubst to correctly substitute its value, it needs to be exported. Please add export ADDITIONAL_CONTEXT after ADDITIONAL_CONTEXT=... statement.

echo "settings<<EOF_DELIM"
cat settings.json
Expand All @@ -75,7 +71,7 @@ jobs:
- name: Run Gemini CLI
uses: google-github-actions/run-gemini-cli@v0.1.22
env:
GEMINI_CLI_TRUST_WORKSPACE: 'true'
GEMINI_CLI_TRUST_WORKSPACE: true
GITHUB_TOKEN: ${{ github.token }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
REPOSITORY: ${{ github.repository }}
Expand Down
Loading