Skip to content

Ensure we fetch all PR detail data - #122078

Merged
ericstj merged 2 commits into
dotnet:mainfrom
ericstj:fixBreakingChangeScript
Dec 3, 2025
Merged

ericstj merged 2 commits into
dotnet:mainfrom
ericstj:fixBreakingChangeScript

Conversation

@ericstj

@ericstj ericstj commented Dec 1, 2025

Copy link
Copy Markdown
Member

As part of the cleanup in PR d27e210#diff-2ba828c15ad12c13f308f51998a4c9240d7c7325135ff7eaaff120e20dd61166L772

I tried to reduce the number of CLI calls when a PR number was specified. When doing so I didn't consolidate the JSON fields, nor did I update the source of the info later in the script.

This addresses both problems. I've validated with local runs - example - #121938 (comment)

@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 1, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug introduced in a previous cleanup where the JSON fields from GitHub CLI calls weren't properly consolidated. The PR ensures all necessary PR detail data is fetched from a single gh pr view call and updates all references to use the correct data source.

Key Changes

  • Modified gh pr list to fetch only the number field (line 777) to reduce unnecessary data transfer
  • Updated gh pr view to fetch all required fields in one call (line 794)
  • Changed all references from $pr to $prDetailData throughout the script (lines 840-901)
Comments suppressed due to low confidence (1)

eng/breakingChanges/breaking-change-doc.ps1:790

  • The variable $pr.title is not available at this point. When using the query mode (line 777), $pr only contains the number field. In single PR mode (line 771), $pr is a hashtable with only number. The title field is only available after line 795 in $prDetailData. This should be changed to either omit the title in the log message or use $prDetailData.title after it's fetched.
    Write-Host "   Collecting data for PR #$($pr.number): $($pr.title)" -ForegroundColor Gray

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@ericstj
ericstj merged commit 2f0cfc8 into dotnet:main Dec 3, 2025
@ericstj

ericstj commented Dec 3, 2025

Copy link
Copy Markdown
Member Author

Thank you for the review. I checked https://github.com/dotnet/runtime/actions/workflows/breaking-change-doc.yml?query=is%3Afailure to see if any other PRs need a manual rerun and don't see any.

@github-actions github-actions Bot locked and limited conversation to collaborators Jan 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants