aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

feat(github): include issue comments and supported attachments in task context

Offen
#582 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
adapters agent-runtime enhancement
Vorherrschende Sprache
TypeScript
Sterne
143
Forks
46
Ø Merge
3 T. 10 Std.
Gemergte PRs (30 T.)
24

Beschreibung

## 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Kontext-Hydration des GitHub-Adapters und dem bestehenden Pfad für die Validierung von URL-Anhängen, den SSRF-Schutz und das Guardrail-Screening. Verwende die im Issue beschriebenen Processor-/Context-Tests und Attachment-Tests, um das Abrufen, Filtern, Extrahieren und Erstellen des Payloads von Kommentaren abzudecken; abgeschlossen ist es, wenn geprüfter unterstützter Kontext enthalten ist, während blockierte Anhänge und optionale Fetch-Fehler sich klar verhalten, ohne andere Integrationen zu beeinträchtigen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github, typescript
Bereich
api, backend, security
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.