Skip to content

Conversation

Copy link

Copilot AI commented Jan 8, 2026

Version bumping was reading from the PR branch, causing incorrect increments when the version had already been modified.

Changes

  • lib/utils/bump.rb: Changed get_content_update to read version file content from @base_branch instead of @head_branch
  • spec/lib/utils/bump_spec.rb: Updated tests to expect content sourced from base branch; removed duplicate test case
# Before
def get_content_update(path)
  head_branch_content = Content.new(config: @config, ref: @head_branch, path: path).content
  # ...
end

# After
def get_content_update(path)
  base_branch_content = Content.new(config: @config, ref: @base_branch, path: path).content
  # ...
end

Version increments now always calculate from the default branch state, regardless of PR branch modifications.

Original prompt

When bumping the version file, can you pull the version file from the default branch, instead of the current branch so that when you increment the version it is always the next version


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 8, 2026 10:08
Co-authored-by: addersuk <131964+addersuk@users.noreply.github.com>
Co-authored-by: addersuk <131964+addersuk@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix version increment logic to use default branch Read version file from base branch for version bumping Jan 8, 2026
Copilot AI requested a review from addersuk January 8, 2026 10:17
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