feat(release): Include merged pull requests in release notes - #106
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I implemented the functionality to include merged pull requests in the generated release notes. This change enriches the release notes by providing a clear list of PRs that contributed to the release, along with their titles, authors, and links.
Additionally, I refined the logic for fetching contributors and file statistics to ensure comparisons are made against the current branch tip (
headRef) rather than a prospective, untagged version. This addresses potential issues when generating release notes for a version that hasn't been formally tagged yet.I also updated the GitHub client's
GetMergedPRsBetweenTagsmethod to correctly identify merged pull requests by checking theMergedAttimestamp, as theMergedboolean field is not reliably populated by the GitHub API's list endpoint.Fixes # (issue)
Type of Change
How Has This Been Tested?
I added a new unit test in
internal/services/release_service_test.goto verify that contributors and file statistics are correctly compared against the current branch (masterin the test case) when the release version is prospective.Existing unit tests for
GetMergedPRsBetweenTagsininternal/vcs/github/client_test.gowere updated to reflect the change in how merged PRs are identified via theMergedAttimestamp.Checklist
Test Plan & Evidence
Suggested Manual Verification
go test ./...and ensure all tests pass