Skip to content

feat: add --auto-merge flag#86

Merged
batonogov merged 6 commits intomainfrom
feature/auto-merge
Mar 5, 2026
Merged

feat: add --auto-merge flag#86
batonogov merged 6 commits intomainfrom
feature/auto-merge

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 5, 2026

🔄 Auto-Generated Pull Request

Branch: feature/auto-merge
Author: Федор Батоногов
Created by: 🤖 GitHub Actions

📊 Change Summary

  • Files changed: 4
  • Commits: 6
  • Statistics: 4 files changed, 488 insertions(+), 39 deletions(-)

🎯 Important Changes

  • 📖 README.md updated

📝 Recent Commits

  • fix: return error for malformed JSON in createMR response (351014a)
  • fix: distinguish empty vs malformed JSON in createMR response (ee61a50)
  • test: add TestAcceptMR406 for unresolved discussions error (632abee)
  • fix: adjust message when MR exists with --auto-merge (bbde1ee)
  • fix: handle empty response body from createMR gracefully (3571d5c)
  • feat: add --auto-merge flag to enable merge when pipeline succeeds (c99b573)

📁 Changed Files

Click to expand list of changed files
  • CLAUDE.md
  • README.md
  • main.go
  • main_test.go

🐳 Docker Image

A Docker image will be automatically built and published for this PR with tag pr-86.

You can find the exact command in the Docker workflow run or check the GitHub Container Registry.

🤖 This PR was automatically created and updated by GitHub Actions.
📅 Last updated: 2026-03-05 13:29:24 UTC

Calls GitLab PUT /merge_requests/:iid/merge with merge_when_pipeline_succeeds
after creating or updating an MR. Also works when MR already exists without
--update-mr. Validates that --auto-merge and --mr-exists are mutually exclusive.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added documentation Improvements or additions to documentation code Changes to source code tests Changes to tests labels Mar 5, 2026
@batonogov batonogov changed the title 🚀 Auto PR: feature/auto-merge feat: add --auto-merge flag Mar 5, 2026
If GitLab returns 201 with empty or invalid JSON body, createMR no longer
fails. Instead it returns MR with zero IID, and auto-merge is skipped
with a warning. Prevents false pipeline failures when MR is already created.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor Author

github-actions bot commented Mar 5, 2026

🚀 Release Preview

Impact: This PR will trigger a MINOR (new features)

📋 Details

  • Commit types: feat,fix,test
  • Release impact: minor
  • Conventional commits: ✅ Yes

🔄 What happens after merge:

  1. Release Please will analyze the merged commits
  2. A Release PR will be created with:
    • Updated version number
    • Generated CHANGELOG.md
    • Release notes
  3. After Release PR merge:
    • Git tag will be created
    • GitHub release will be published
    • Docker images will be built and published
    • Binaries will be built for all platforms

This comment is automatically updated by the Release Coordination workflow.

batonogov and others added 4 commits March 5, 2026 16:05
Show "enabling auto-merge" instead of "Use --update-mr flag" when
--auto-merge is set, since auto-merge will actually proceed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Empty body (EOF) is handled silently. Malformed JSON (e.g. HTML from
a proxy) prints a warning with the parse error. Neither case fails
the pipeline since the MR was already created.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Empty body (EOF) is still tolerated since the MR was created. But
invalid JSON (e.g. HTML from a proxy) now returns an error instead
of being silently ignored.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@batonogov batonogov merged commit a27ca7a into main Mar 5, 2026
12 checks passed
@github-actions
Copy link
Contributor Author

github-actions bot commented Mar 5, 2026

✅ Merged Successfully

Your changes have been merged to main! Here's what happens next:

🔄 Automated Workflows

📋 Next Steps

  1. Release Please will analyze your commits
  2. If release-worthy changes detected, a Release PR will be created
  3. Review and merge the Release PR to publish the release

📚 Documentation


Thank you for contributing! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code Changes to source code documentation Improvements or additions to documentation tests Changes to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant