edsger 0.19.13 → 0.19.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -89,17 +89,19 @@ export const refineCodeFromPRFeedback = async (options, config) => {
|
|
|
89
89
|
}
|
|
90
90
|
// Determine the correct base branch for rebase using base_branch_id
|
|
91
91
|
const baseBranchInfo = await getBaseBranchInfo(currentBranch, allBranches, 'main');
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
// Always use the baseBranch from getBaseBranchInfo - it handles all cases:
|
|
93
|
+
// - No base branch: returns 'main'
|
|
94
|
+
// - Base branch merged: returns feat branch (dev/xxx -> feat/xxx)
|
|
95
|
+
// - Base branch not merged: returns dev branch
|
|
96
|
+
baseBranchForRebase = baseBranchInfo.baseBranch;
|
|
97
|
+
if (verbose) {
|
|
98
|
+
if (!currentBranch.base_branch_id) {
|
|
99
|
+
// No base branch - first branch in chain
|
|
97
100
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if (verbose) {
|
|
101
|
+
else if (baseBranchInfo.baseBranchMerged) {
|
|
102
|
+
logInfo(` Base branch is merged, will rebase from feat branch: ${baseBranchForRebase}`);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
103
105
|
logInfo(` Will rebase from base branch: ${baseBranchForRebase}`);
|
|
104
106
|
}
|
|
105
107
|
}
|
|
@@ -131,7 +131,8 @@ export const reviewPullRequest = async (options, config) => {
|
|
|
131
131
|
try {
|
|
132
132
|
// Get all branches to determine base branch info
|
|
133
133
|
allBranches = await getBranches({ featureId, verbose });
|
|
134
|
-
currentBranch =
|
|
134
|
+
currentBranch =
|
|
135
|
+
allBranches.find((b) => b.status === 'ready_for_review') || null;
|
|
135
136
|
if (currentBranch && currentBranch.branch_name) {
|
|
136
137
|
// Use branch_name directly (already stored as dev/...)
|
|
137
138
|
branchName = currentBranch.branch_name;
|
|
@@ -141,17 +142,19 @@ export const reviewPullRequest = async (options, config) => {
|
|
|
141
142
|
}
|
|
142
143
|
// Determine the correct base branch for rebase using base_branch_id
|
|
143
144
|
const baseBranchInfo = await getBaseBranchInfo(currentBranch, allBranches, 'main');
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
// Always use the baseBranch from getBaseBranchInfo - it handles all cases:
|
|
146
|
+
// - No base branch: returns 'main'
|
|
147
|
+
// - Base branch merged: returns feat branch (dev/xxx -> feat/xxx)
|
|
148
|
+
// - Base branch not merged: returns dev branch
|
|
149
|
+
baseBranchForRebase = baseBranchInfo.baseBranch;
|
|
150
|
+
if (verbose) {
|
|
151
|
+
if (!currentBranch.base_branch_id) {
|
|
152
|
+
// No base branch - first branch in chain
|
|
149
153
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (verbose) {
|
|
154
|
+
else if (baseBranchInfo.baseBranchMerged) {
|
|
155
|
+
logInfo(` Base branch is merged, will rebase from feat branch: ${baseBranchForRebase}`);
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
155
158
|
logInfo(` Will rebase from base branch: ${baseBranchForRebase}`);
|
|
156
159
|
}
|
|
157
160
|
}
|