mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
ci: Fix discussion answering agent
a. dump the discussion content to a tmp file first to avoid github redaction of environment variable b. instruct the agent to use get_discussion_and_comments only when discussion content json is not available. PiperOrigin-RevId: 805581573
This commit is contained in:
committed by
Copybara-Service
parent
f96f0ebd0d
commit
0bc2ee64e3
@@ -46,9 +46,9 @@ jobs:
|
||||
REPO: 'adk-python'
|
||||
INTERACTIVE: 0
|
||||
PYTHONPATH: contributing/samples
|
||||
DISCUSSION_JSON: ${{ toJson(github.event.discussion) }}
|
||||
run: |
|
||||
# Replace single quotes with the sequence that allows them to be used in a single-quoted string
|
||||
# This replaces ' with '\'', which ends the current single-quoted string, adds an escaped single quote, then starts a new single-quoted string
|
||||
SAFE_JSON="${DISCUSSION_JSON//\'/\'\\\'\'}"
|
||||
python -m adk_answering_agent.main --discussion '$SAFE_JSON'
|
||||
# Write discussion data to temporary file to avoid secret masking issues
|
||||
cat > /tmp/discussion.json << 'EOF'
|
||||
${{ toJson(github.event.discussion) }}
|
||||
EOF
|
||||
python -m adk_answering_agent.main --discussion-file /tmp/discussion.json
|
||||
|
||||
Reference in New Issue
Block a user