edsger 0.19.8 → 0.19.9
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.
|
@@ -7,6 +7,7 @@ import { Octokit } from '@octokit/rest';
|
|
|
7
7
|
import { logInfo, logError } from '../../utils/logger.js';
|
|
8
8
|
import { parsePullRequestUrl, fetchPRReviews } from '../code-refine/context.js';
|
|
9
9
|
import { getFeature } from '../../api/features/get-feature.js';
|
|
10
|
+
import { getReadyForReviewBranch, } from '../../services/branches.js';
|
|
10
11
|
import { fetchPRFileChanges, fetchUnresolvedReviewThreads, resolveReviewThreads, dismissReviews, } from './github.js';
|
|
11
12
|
import { analyzeAllThreads } from './llm-analyzer.js';
|
|
12
13
|
// Re-export types for backward compatibility
|
|
@@ -20,15 +21,39 @@ export async function verifyAndResolveComments(options) {
|
|
|
20
21
|
logInfo(`Starting code refine verification for feature ID: ${featureId}`);
|
|
21
22
|
}
|
|
22
23
|
try {
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
// For multi-branch features, find the branch that is ready for review
|
|
25
|
+
let currentBranch = null;
|
|
26
|
+
try {
|
|
27
|
+
currentBranch = await getReadyForReviewBranch({ featureId, verbose });
|
|
28
|
+
if (currentBranch && verbose) {
|
|
29
|
+
logInfo(`📋 Found ready_for_review branch: ${currentBranch.name}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
if (verbose) {
|
|
34
|
+
logInfo(`Note: Could not fetch feature branches`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// Get PR URL from branch (for multi-branch features) or feature
|
|
38
|
+
let pullRequestUrl = null;
|
|
39
|
+
if (currentBranch && currentBranch.pull_request_url) {
|
|
40
|
+
pullRequestUrl = currentBranch.pull_request_url;
|
|
41
|
+
if (verbose) {
|
|
42
|
+
logInfo(`📝 Using PR URL from branch: ${pullRequestUrl}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
// Fall back to feature's PR URL for single-branch features
|
|
47
|
+
const feature = await getFeature(featureId, verbose);
|
|
48
|
+
pullRequestUrl = feature.pull_request_url || null;
|
|
49
|
+
}
|
|
50
|
+
if (!pullRequestUrl) {
|
|
26
51
|
throw new Error(`Feature ${featureId} does not have a pull request URL. Cannot perform verification.`);
|
|
27
52
|
}
|
|
28
53
|
// Parse PR URL
|
|
29
|
-
const prInfo = parsePullRequestUrl(
|
|
54
|
+
const prInfo = parsePullRequestUrl(pullRequestUrl);
|
|
30
55
|
if (!prInfo) {
|
|
31
|
-
throw new Error(`Invalid pull request URL: ${
|
|
56
|
+
throw new Error(`Invalid pull request URL: ${pullRequestUrl}. Expected format: https://github.com/owner/repo/pull/123`);
|
|
32
57
|
}
|
|
33
58
|
const { owner, repo, prNumber } = prInfo;
|
|
34
59
|
// Initialize Octokit with GitHub token (supports both REST and GraphQL)
|
|
@@ -7,7 +7,7 @@ import { fetchFunctionalTestingContext, formatContextForPrompt, } from './contex
|
|
|
7
7
|
import { updateFeatureStatus } from '../../api/features/index.js';
|
|
8
8
|
import { createTestReport, } from './test-report-creator.js';
|
|
9
9
|
import { preparePhaseGitEnvironment, prepareCustomBranchGitEnvironment, } from '../../utils/git-branch-manager.js';
|
|
10
|
-
import { getReadyForReviewBranch } from '../../services/branches.js';
|
|
10
|
+
import { getReadyForReviewBranch, } from '../../services/branches.js';
|
|
11
11
|
function userMessage(content) {
|
|
12
12
|
return {
|
|
13
13
|
type: 'user',
|
|
@@ -57,13 +57,15 @@ export const runFunctionalTesting = async (options, config, checklistContext) =>
|
|
|
57
57
|
}
|
|
58
58
|
const context = await fetchFunctionalTestingContext(featureId, verbose);
|
|
59
59
|
// Fetch feedbacks for functional testing phase
|
|
60
|
+
// For multi-branch features, include branch-specific feedbacks
|
|
60
61
|
let feedbacksInfo;
|
|
61
62
|
try {
|
|
62
|
-
const feedbacksContext = await getFeedbacksForPhase({ featureId, verbose }, 'functional_testing'
|
|
63
|
+
const feedbacksContext = await getFeedbacksForPhase({ featureId, verbose }, 'functional_testing', currentBranch?.id // Pass branch_id if we have a current branch
|
|
64
|
+
);
|
|
63
65
|
if (feedbacksContext.feedbacks.length > 0) {
|
|
64
66
|
feedbacksInfo = await formatFeedbacksForContext(feedbacksContext);
|
|
65
67
|
if (verbose) {
|
|
66
|
-
logInfo(`Added ${feedbacksContext.feedbacks.length} human feedbacks to testing context`);
|
|
68
|
+
logInfo(`Added ${feedbacksContext.feedbacks.length} human feedbacks to testing context${currentBranch ? ` (including branch-specific for "${currentBranch.name}")` : ''}`);
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
}
|