Skip to content

Add PR URL and repository name to GithubViewPRTool response#939

Draft
codegen-sh[bot] wants to merge 2 commits intodevelopfrom
codegen-pr-url-fix-20250322
Draft

Add PR URL and repository name to GithubViewPRTool response#939
codegen-sh[bot] wants to merge 2 commits intodevelopfrom
codegen-pr-url-fix-20250322

Conversation

@codegen-sh
Copy link
Contributor

@codegen-sh codegen-sh bot commented Mar 21, 2025

This PR adds the PR URL and repository name to the GithubViewPRTool response, which helps the agent correctly identify which repository a PR belongs to.

Changes:

  1. Added two new fields to the ViewPRObservation class:

    • repo_name: The name of the repository containing the PR
    • pr_url: The URL of the PR
  2. Updated the view_pr function to:

    • Get the PR object to extract the URL
    • Get the repository name from the Git repo
    • Include these values in the response
  3. Updated the GithubViewPRTool description to mention that it returns the PR URL and repository name

This fixes the issue where the agent incorrectly looked for PRs in the active codebase instead of the actual repository the PR belongs to.

Resolves CG-12280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants