fix(PL-5471): preserve release info when commit metadata lookup fails#280
Merged
nwaller-nesto merged 3 commits intoJun 22, 2026
Merged
Conversation
Add two cases to TestGetReleaseInfo verifying that GetCommitsMetadata and GetCommitsGitHubAuthors failures leave getReleaseInfo returning a non-nil ReleaseInfo with version and tag fields intact (rather than propagating nil, error up to the caller). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When GetCommitsMetadata or GetCommitsGitHubAuthors fail (e.g. because the gitTagTemplate produces a tag prefix that doesn't exist in the service's repo), the error previously propagated up to perform(), which then created a bare ReleaseInfo with all version and tag fields zeroed. The commit template would render blank versions and a broken compare URL like https://github.com/org/repo/compare/... Match the existing graceful pattern used for GetProjectSourceDir failure: store the error in releaseInfo.Error and return the partial struct so version/tag fields remain populated and the template renders a valid (if commit-list-free) body. The error is still surfaced via the existing '# Rendering Errors:' footer. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 43707fb. Configure here.
When GetCommitsGitHubAuthors fails after GetCommitsMetadata succeeds, fall through to the commit-building loop with a nil authors map instead of returning early, so the already-fetched commit list is not discarded. Extend the test to assert commits are preserved with empty GitHubAuthor. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
silphid
approved these changes
Jun 22, 2026
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.

What
When
GetCommitsMetadataorGetCommitsGitHubAuthorsfail duringrelease promote, the error now degrades gracefully instead of producing a malformed commit body.Why
Previously, these errors propagated up to
perform(), which constructed a bareReleaseInfowith all version and tag fields zeroed. The commit template would then render blank versions and a broken compare URL:GetProjectSourceDirfailure was already handled gracefully (storing the error and returning the partial struct). This fix applies the same pattern to the two downstream calls so version/tag fields remain populated and the error is surfaced via the existing# Rendering Errors:footer.Test Plan
TestGetReleaseInfocovering both failure pathsNote
Low Risk
Localized change to promote PR message assembly with tests; no auth or data-path changes, only error-handling behavior for optional enrichment steps.
Overview
getReleaseInfono longer aborts promote PR rendering when commit history or GitHub author lookups fail. Failures onGetCommitsMetadataandGetCommitsGitHubAuthorsnow follow the same graceful path asGetProjectSourceDir: the error is stored onReleaseInfo.Error, the function returns a populated struct (versions, git tags, compare range), and the promote message can still render with the existing# Rendering Errors:footer.When author lookup fails but commit metadata succeeds, the change continues building the commit list with empty
GitHubAuthorfields instead of dropping all release context.Two
TestGetReleaseInfocases lock in both failure paths.Reviewed by Cursor Bugbot for commit ffd6227. Bugbot is set up for automated code reviews on this repo. Configure here.