Skip to content

Conversation

Copy link

Copilot AI commented Dec 30, 2025

The action now merges the default branch into the PR branch before bumping version files, ensuring the PR is up-to-date before making changes.

Changes

  • New Merge utility (lib/utils/merge.rb): Uses Octokit's merge API to merge base into head branch

    • Returns success/failure with message
    • Handles conflicts, already-up-to-date, and error scenarios
  • Updated Bump#bump_everything: Refactored to call merge first

    • Aborts version bump if merge fails
    • Recalculates version data post-merge to account for potential file changes
    • Prepends merge status to bump message
  • Test coverage: Added merge_spec.rb and updated existing specs to mock merge calls

Behavior

When /dobby version <level> is invoked:

  1. Merge default branch → PR branch
  2. If merge succeeds: bump versions
  3. If merge fails: return error, skip bump

Example output for merge conflict:

### :boom: Merge failed :boom:

Failed to merge main into feature-branch: merge conflict detected

Example output for successful flow:

### Merge complete

Successfully merged main into feature-branch

### Bump version from 1.0.0 to 1.1.0
| File Name | Message |
|-----------|---------|
| lib/version.rb | Bump minor version from 1.0.0 to 1.1.0 |
Original prompt

Can you extend this action so the first thing it does is updates the PR from the default branch using merge strategy and then if that succeeds it then bumps the version in the relevant files.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits December 30, 2025 11:48
Co-authored-by: addersuk <131964+addersuk@users.noreply.github.com>
Co-authored-by: addersuk <131964+addersuk@users.noreply.github.com>
Co-authored-by: addersuk <131964+addersuk@users.noreply.github.com>
…omments

Co-authored-by: addersuk <131964+addersuk@users.noreply.github.com>
Copilot AI changed the title [WIP] Update PR from default branch and bump version Merge base branch into PR before version bump Dec 30, 2025
Copilot AI requested a review from addersuk December 30, 2025 12:02
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