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
- if (baseBranchInfo.baseBranchMerged) {
93
- // Base branch is merged (or no base branch) - rebase from main
94
- baseBranchForRebase = 'main';
95
- if (verbose && currentBranch.base_branch_id) {
96
- logInfo(` Base branch is merged, will rebase from main`);
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
- else {
100
- // Base branch not merged - rebase from base branch's dev branch
101
- baseBranchForRebase = baseBranchInfo.baseBranch;
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 = allBranches.find((b) => b.status === 'ready_for_review') || null;
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
- if (baseBranchInfo.baseBranchMerged) {
145
- // Base branch is merged (or no base branch) - rebase from main
146
- baseBranchForRebase = 'main';
147
- if (verbose && currentBranch.base_branch_id) {
148
- logInfo(` Base branch is merged, will rebase from main`);
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
- else {
152
- // Base branch not merged - rebase from base branch's dev branch
153
- baseBranchForRebase = baseBranchInfo.baseBranch;
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edsger",
3
- "version": "0.19.13",
3
+ "version": "0.19.14",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "edsger": "dist/index.js"