generate_pr_payload
Analyzes Git diffs and Bitbucket PR data to produce a compact JSON payload for AI-powered PR description generation, reducing token usage.
Instructions
Extracts Bitbucket PR or local Git branch diffs, commits, and AST module categorizations into a compact JSON schema (~1-2KB) for AI PR description generation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr_url | No | Full Bitbucket PR URL (e.g., https://bitbucket.org/workspace/repo/pull-requests/123). | |
| repo_path | No | Absolute path to target Git repo directory. | |
| source_branch | No | Source branch name (e.g., feature/WCE-815). Defaults to currently checked out branch. | |
| target_branch | No | Target branch name (e.g., main or release/staging). Defaults to main. |