feat(refinery): implement handleSuccess for merge queue
Implement success handling for the merge queue Engineer: - Add handleSuccess method that handles successful merge completion - Update MR body with merge_commit SHA and close_reason - Close MR with 'merged' reason - Close source issue with reference to MR ID - Delete source branch if delete_merged_branches is configured - Add DeleteRemoteBranch method to git package - Add git client to Engineer struct - Add tests for new functionality Closes gt-3x1.5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -347,7 +347,7 @@ func (g *Git) RemoteBranchExists(remote, branch string) (bool, error) {
|
||||
return out != "", nil
|
||||
}
|
||||
|
||||
// DeleteBranch deletes a branch.
|
||||
// DeleteBranch deletes a local branch.
|
||||
func (g *Git) DeleteBranch(name string, force bool) error {
|
||||
flag := "-d"
|
||||
if force {
|
||||
@@ -357,6 +357,12 @@ func (g *Git) DeleteBranch(name string, force bool) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteRemoteBranch deletes a branch from the remote.
|
||||
func (g *Git) DeleteRemoteBranch(remote, branch string) error {
|
||||
_, err := g.run("push", remote, "--delete", branch)
|
||||
return err
|
||||
}
|
||||
|
||||
// Rev returns the commit hash for the given ref.
|
||||
func (g *Git) Rev(ref string) (string, error) {
|
||||
return g.run("rev-parse", ref)
|
||||
|
||||
Reference in New Issue
Block a user