Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add simple title, commit message, and body text generation #11763

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

brettfo
Copy link
Contributor

@brettfo brettfo commented Mar 7, 2025

These changes are for the end-to-end updater and this code is not live.

Adds simple PR title generation of the shape:

Update Some.Package to 1.2.3

In a more complicated scenario where multiple versions were updated for multiple packages the text will look like:

Update Package.A to 1.0.0, 2.0.0; Package.B to 3.0.0, 4.0.0

The same text is used for all three generated fields: PR title, body, and commit message.

The other tests were modified to always report static text for these fields so that changes to the new text generation won't cause a bunch of other tests to fail and require a lot of churn.

@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Mar 7, 2025
@brettfo brettfo force-pushed the dev/brettfo/nuget-pr-text branch from 82af66e to d7e3974 Compare March 7, 2025 20:48
.Where(d => d.Version is not null)
.Select(d => d.Version!)
.OrderBy(d => NuGetVersion.Parse(d))
.ToArray()
Copy link
Contributor

Choose a reason for hiding this comment

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

q: Is there a reason we need to force evaluation with .ToArray() here or is it just habit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's purely so I can see the result in the debugger without expanding the "Results" element. Similar reason I set "var title = ..." then immediately "return title;"; it's so I have handy breakpoint locations and can immediately see the value.

@brettfo brettfo marked this pull request as ready for review March 7, 2025 22:24
@brettfo brettfo requested a review from a team as a code owner March 7, 2025 22:24
@sachin-sandhu sachin-sandhu force-pushed the dev/brettfo/nuget-pr-text branch from d7e3974 to ad52297 Compare March 10, 2025 23:17
@sachin-sandhu sachin-sandhu merged commit 114cd43 into main Mar 11, 2025
77 checks passed
@sachin-sandhu sachin-sandhu deleted the dev/brettfo/nuget-pr-text branch March 11, 2025 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants