create-claude-workspace 2.3.30 → 2.3.31
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.
|
@@ -74,6 +74,14 @@ export function getPRStatus(cwd, platform, branch) {
|
|
|
74
74
|
}
|
|
75
75
|
return getGitLabMRStatus(cwd, branch);
|
|
76
76
|
}
|
|
77
|
+
/** Like getPRStatus but uses the MR/PR number directly (more reliable than branch name lookup). */
|
|
78
|
+
export function getPRStatusByNumber(cwd, platform, prNumber) {
|
|
79
|
+
const id = String(prNumber);
|
|
80
|
+
if (platform === 'github') {
|
|
81
|
+
return getGitHubPRStatus(cwd, id);
|
|
82
|
+
}
|
|
83
|
+
return getGitLabMRStatus(cwd, id);
|
|
84
|
+
}
|
|
77
85
|
function getGitHubPRStatus(cwd, branch) {
|
|
78
86
|
const output = run('gh', [
|
|
79
87
|
'pr', 'view', branch,
|
package/dist/scheduler/loop.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { buildGraph, getParallelBatches, isPhaseComplete, getNextPhase, isProjec
|
|
|
10
10
|
import { writeState, appendEvent, createEvent, rotateLog } from './state/state.mjs';
|
|
11
11
|
import { recordSession, getSession, clearSession } from './state/session.mjs';
|
|
12
12
|
import { createWorktree, commitInWorktree, getChangedFiles, cleanupWorktree, mergeToMain, syncMain, pushWorktree, forcePushWorktree, rebaseOnMain, cleanMainForMerge, popStash, getMainBranch, listWorktrees, listOrphanedWorktrees, isBranchMerged, getCurrentBranch, hasUncommittedChanges, deleteBranchRemote, cleanMergedBranches, pruneRemoteBranches, findStaleUnmergedBranches, } from './git/manager.mjs';
|
|
13
|
-
import { createPR, getPRStatus, getPRComments, mergePR, closePR } from './git/pr-manager.mjs';
|
|
13
|
+
import { createPR, getPRStatus, getPRStatusByNumber, getPRComments, mergePR, closePR } from './git/pr-manager.mjs';
|
|
14
14
|
import { scanAgents } from './agents/health-checker.mjs';
|
|
15
15
|
import { detectCIPlatform, fetchFailureLogs } from './git/ci-watcher.mjs';
|
|
16
16
|
import { createRelease } from './git/release.mjs';
|
|
@@ -1230,7 +1230,8 @@ async function checkPRWatch(taskId, pipeline, projectDir, agents, deps) {
|
|
|
1230
1230
|
return 'failed';
|
|
1231
1231
|
const branch = pipeline.branchSlug;
|
|
1232
1232
|
try {
|
|
1233
|
-
|
|
1233
|
+
// Use PR number (more reliable than branch name lookup which can fail on glab)
|
|
1234
|
+
const prStatus = getPRStatusByNumber(projectDir, ciPlatform, pipeline.prState.prNumber);
|
|
1234
1235
|
if (prStatus.status === 'merged')
|
|
1235
1236
|
return 'merged';
|
|
1236
1237
|
// PR was closed (not merged) — try local merge as fallback before giving up
|