fix: Fetch remote before merge/push in initiative approval
approveInitiative was merging and pushing with a stale local defaultBranch, causing "rejected (fetch first)" when origin/main had advanced since the last project sync. Now fetches remote and fast-forwards the target branch before merging.
This commit is contained in:
@@ -49,6 +49,8 @@ function createMocks() {
|
||||
getMergeBase: vi.fn().mockResolvedValue('abc123'),
|
||||
pushBranch: vi.fn(),
|
||||
checkMergeability: vi.fn().mockResolvedValue({ mergeable: true }),
|
||||
fetchRemote: vi.fn(),
|
||||
fastForwardBranch: vi.fn(),
|
||||
};
|
||||
|
||||
const phaseRepository = {
|
||||
|
||||
Reference in New Issue
Block a user