aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
feat(github): include issue comments and supported attachments in task context
- Lingua principale
- TypeScript
- Stelle
- 143
- Fork
- 46
- Merge medio
- 3g 10h
- PR unite (30g)
- 24
Descrizione
## Component
CDK GitHub adapter, context hydration, attachment screening
## Describe the feature
GitHub issue-origin tasks should include practical issue context beyond the title/body: recent issue comments and supported markdown-linked attachments or URLs, screened through the existing ABCA input pipeline.
## Use case
GitHub issues often collect repro logs, screenshots, design links, and clarifications in comments after the original issue body. If ABCA only sees the title/body from the webhook payload, it may miss context the team already provided.
## Proposed solution
Add context enrichment for GitHub issue-triggered tasks:
- Fetch the issue body and recent human comments through the GitHub REST API after webhook verification.
- Include recent comments in the task description with attribution and ordering.
- Extract supported markdown image/URL attachments from issue body and selected comments.
- Route URL attachments through the existing URL attachment validation, SSRF protection, and Guardrail screening path.
- Skip bot comments and ABCA-authored comments to avoid self-feedback loops.
- Keep existing attachment limits and fail-closed behavior for blocked or unscreenable attachments.
## Acceptance criteria
- GitHub issues with recent comments include those comments in the task context.
- Supported markdown-linked images/URLs are passed as screened attachments.
- Unsupported, too-large, blocked, or unscreenable attachments do not reach the agent.
- Optional comment fetch failures are logged and produce clear behavior without silently corrupting task context.
- Linear, Jira, Slack, and API task context behavior is unaffected.
## Tests
- Processor/context tests cover comment fetching, bot-comment filtering, attachment extraction, and task payload construction.
- Attachment tests cover URL screening failures and successful URL attachment hydration.
- Docs describe what GitHub issue context is included.
## Out of scope
- Downloading arbitrary binary uploads from private GitHub issue comments unless already supported by the shared attachment pipeline.
- GitHub Discussions.
- Fetching every historical comment on long-running issues.
- GHES-specific URL handling.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dall’idratazione del contesto dell’adapter GitHub e dal percorso esistente di validazione degli allegati URL, protezione SSRF e screening Guardrail. Usa i test processor/context e i test degli allegati descritti nell’issue per coprire il recupero, il filtraggio, l’estrazione e la costruzione del payload dei commenti; il lavoro è completo quando il contesto supportato sottoposto a screening viene incluso, mentre gli allegati bloccati e i fallimenti opzionali di fetch si comportano in modo chiaro senza influire sulle altre integrazioni.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- github, typescript
- Ambito
- api, backend, security
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100