fix(dist-git): Static release bumping from lock history#140
Open
Tonisal-byte wants to merge 3 commits intomicrosoft:mainfrom
Open
fix(dist-git): Static release bumping from lock history#140Tonisal-byte wants to merge 3 commits intomicrosoft:mainfrom
Tonisal-byte wants to merge 3 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates static Release bumping for non-autorelease specs to reset the bump counter when the upstream Version changes (aligning with rpmautospec-like behavior), instead of counting all synthetic commits across multiple upstream versions.
Changes:
- Add version extraction from spec content and compute a version-aware synthetic commit count based on upstream commit history.
- Refactor sources repo open/init logic to be shared by release bump computation and synthetic history recording.
- Expand tests to cover version-aware counting behavior across upstream version changes.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/app/azldev/core/sources/synthistory.go | Adjusts parsing of git log metadata blocks by changing whitespace trimming. |
| internal/app/azldev/core/sources/sourceprep.go | Introduces openOrInitSourcesRepo and reorders repo open/init vs static release bumping. |
| internal/app/azldev/core/sources/release.go | Adds version tag parsing, upstream version lookup, and version-aware commit counting used by static release bumping. |
| internal/app/azldev/core/sources/release_test.go | Adds unit tests for GetVersionTagFromReader and CountCommitsSinceVersionChange. |
| internal/app/azldev/core/sources/release_internal_test.go | Updates tryBumpStaticRelease tests to the new signature and behavior. |
a1e97f0 to
4fb4cc3
Compare
4fb4cc3 to
d323882
Compare
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.
Static release bumping for non-autorelease specs now resets the release counter when the upstream Version changes, matching rpmautospec behavior.
Previously, tryBumpStaticRelease counted all synthetic commits regardless of version changes, producing inflated release numbers. Now it walks fingerprint changes newest-to-oldest, reads the Version tag from the dist-git spec at each upstream commit, and only counts commits since the last version change.