Skip to content

fix(dist-git): Static release bumping from lock history#140

Open
Tonisal-byte wants to merge 3 commits intomicrosoft:mainfrom
Tonisal-byte:asalinas/non-autorelease-2.0
Open

fix(dist-git): Static release bumping from lock history#140
Tonisal-byte wants to merge 3 commits intomicrosoft:mainfrom
Tonisal-byte:asalinas/non-autorelease-2.0

Conversation

@Tonisal-byte
Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings April 30, 2026 22:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread internal/app/azldev/core/sources/synthistory.go Outdated
Comment thread internal/app/azldev/core/sources/sourceprep.go
Comment thread internal/app/azldev/core/sources/release.go Outdated
@Tonisal-byte Tonisal-byte force-pushed the asalinas/non-autorelease-2.0 branch from a1e97f0 to 4fb4cc3 Compare April 30, 2026 23:06
@Tonisal-byte Tonisal-byte marked this pull request as ready for review April 30, 2026 23:07
Copilot AI review requested due to automatic review settings April 30, 2026 23:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread internal/app/azldev/core/sources/sourceprep.go
Comment thread internal/app/azldev/core/sources/release.go
Comment thread internal/app/azldev/core/sources/release.go
@Tonisal-byte Tonisal-byte force-pushed the asalinas/non-autorelease-2.0 branch from 4fb4cc3 to d323882 Compare May 1, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants