Skip to content

Git-based PR URL detection via gh pr list #2904

@rysweet

Description

@rysweet

Add a git-based PR URL detection to _session_gather.py gather command. Run gh pr list --head branch on the remote VM and extract PR URL. More reliable than regex on transcript text.

Files to modify:

  • src/amplihack/fleet/_session_gather.py

Requirements:

  1. Add _detect_pr_url(vm_name, branch) function
  2. Run 'gh pr list --head BRANCH --json url --limit 1' via SSH on remote VM
  3. Parse JSON output to extract PR URL
  4. Fall back to existing regex-based detection if gh command fails
  5. Include PR URL in gathered session context
  6. All 918+ fleet tests must pass
  7. Commit changes on this branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions