print("GEMINI_API_KEY not found", file=sys.stderr)
sys.exit(1)
ifnotissue_titleandnotissue_body:
print("Error: ISSUE_TITLE and ISSUE_BODY are both empty. Answering skipped.", file=sys.stderr)
sys.exit(0)
# Read skills context if it exists
skill_content=""
ifos.path.exists(skill_file):
withopen(skill_file, "r") asf:
skill_content=f.read()
else:
print(f"Warning: Skill file {skill_file} not found. Proceeding without skills context.", file=sys.stderr)
prompt=f"""
You are an expert AI maintainer for the `android-maps-compose` open-source library.
Your task is to answer a user's GitHub issue in a helpful, friendly, professional, and highly accurate manner.
Here is the repository's `SKILL.md` guide containing the self-updating skills and latest setup instructions:
```markdown
{skill_content}
```
Below are the details of the issue submitted by the user:
- **Title**: {issue_title}
- **Body**:
{issue_body}
Your response should:
1. Welcome and thank the user for reaching out.
2. Provide a clear, correct explanation or troubleshooting steps.
3. Reference the `SKILL.md` patterns where appropriate (e.g., correct dependencies, secrets plugin setup, or marker states).
4. Provide idiomatic Jetpack Compose and Kotlin code examples if applicable.
5. If the issue is a bug report that needs library maintainers to inspect, let them know, but still provide potential workarounds or troubleshooting steps.
6. Keep your tone humble, polite, and constructive. Do not use overly formal or robotic language.
Please return ONLY the markdown content of your comment to the user. Do not wrap your entire response in a code block.
"""
print("Requesting issue response from Gemini...", file=sys.stderr)