aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
feat(github): include issue comments and supported attachments in task context
- Dominant language
- TypeScript
- Stars
- 143
- Forks
- 46
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 20
Description
## 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.
Contributor guide
Research direction
Start with the GitHub adapter's context hydration and the existing URL attachment validation, SSRF protection, and Guardrail screening path. Use the processor/context tests and attachment tests described in the issue to cover comment fetching, filtering, extraction, and payload construction; done means screened supported context is included while blocked attachments and optional fetch failures behave clearly without affecting other integrations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, typescript
- Domain
- api, backend, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100