ge.context¶
Context assembly and rendering.
Combines issue/PR data, comments, media, and analysis into a single structured context document that an AI agent can consume.
Functions
|
Prepare full context for a GitHub Discussion. |
|
Prepare full context for working on a GitHub issue. |
|
Prepare full context for working on or reviewing a GitHub PR. |
Render discussion context as a structured markdown document. |
|
|
Render issue context as a structured markdown document. |
|
Render PR context as a structured markdown document. |
- ge.context.prepare_discussion(repo, number, *, output_dir=None, download_media_flag=True, describe_media=True)[source]¶
Prepare full context for a GitHub Discussion.
Fetches the discussion and its comments via GraphQL, downloads media, and writes a context document.
>>> # ctx = prepare_discussion('owner/repo', 5)
- ge.context.prepare_issue(repo, number, *, output_dir=None, download_media_flag=True, describe_media=True)[source]¶
Prepare full context for working on a GitHub issue.
Fetches the issue, comments, media, and performs staleness analysis. Writes a context document and manifest to output_dir.
When
describe_mediais True (default) and theanthropicpackage is installed withANTHROPIC_API_KEYset, downloaded images are sent to the Claude API for automated description. The description is included in the context document so the agent has visual context without manual image pasting.Returns dict with all assembled context.
>>> # ctx = prepare_issue('owner/repo', 42)
- ge.context.prepare_pr(repo, number, *, output_dir=None, download_media_flag=True, include_diff=True, describe_media=True)[source]¶
Prepare full context for working on or reviewing a GitHub PR.
>>> # ctx = prepare_pr('owner/repo', 7)
- ge.context.render_discussion_context(ctx)[source]¶
Render discussion context as a structured markdown document.