@link-assistant/hive-mind 1.69.0 → 1.69.1
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.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/solve.feedback.lib.mjs +7 -3
- package/src/solve.mjs +1 -0
- package/src/solve.preparation.lib.mjs +2 -1
- package/src/solve.watch.lib.mjs +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @link-assistant/hive-mind
|
|
2
2
|
|
|
3
|
+
## 1.69.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2911597: Fix feedback comment counting to run local git timestamp checks in the prepared repository directory, avoiding misleading `not a git repository` diagnostics in detached solve sessions.
|
|
8
|
+
|
|
3
9
|
## 1.69.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ import { reportError } from './sentry.lib.mjs';
|
|
|
8
8
|
|
|
9
9
|
import { wrapDollarWithGhRetry as _wrapDollarWithGhRetry } from './github-rate-limit.lib.mjs'; // rate-limit marker (#1726): gh API calls flow through $ wrapped by caller
|
|
10
10
|
export const detectAndCountFeedback = async params => {
|
|
11
|
-
const { prNumber, branchName, owner, repo, issueNumber, isContinueMode, argv, mergeStateStatus, prState, workStartTime, log, formatAligned, cleanErrorMessage,
|
|
11
|
+
const { prNumber, branchName, owner, repo, issueNumber, isContinueMode, argv, mergeStateStatus, prState, workStartTime, log, formatAligned, cleanErrorMessage, $, repositoryPath = null } = params;
|
|
12
12
|
|
|
13
13
|
let newPrComments = 0;
|
|
14
14
|
let newPrReviewComments = 0;
|
|
@@ -53,14 +53,18 @@ export const detectAndCountFeedback = async params => {
|
|
|
53
53
|
if (argv.verbose) {
|
|
54
54
|
await log(` PR #${prNumber} on branch: ${branchName}`, { verbose: true });
|
|
55
55
|
await log(` Owner/Repo: ${owner}/${repo}`, { verbose: true });
|
|
56
|
+
if (repositoryPath) {
|
|
57
|
+
await log(` Repository path: ${repositoryPath}`, { verbose: true });
|
|
58
|
+
}
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
// Get the last commit timestamp from the PR branch
|
|
59
62
|
let lastCommitTime = null;
|
|
60
|
-
|
|
63
|
+
const git$ = repositoryPath ? $({ cwd: repositoryPath }) : $;
|
|
64
|
+
let lastCommitResult = await git$`git log -1 --format="%aI" origin/${branchName}`;
|
|
61
65
|
if (lastCommitResult.code !== 0) {
|
|
62
66
|
// Fallback to local branch if remote doesn't exist
|
|
63
|
-
lastCommitResult = await $`git log -1 --format="%aI" ${branchName}`;
|
|
67
|
+
lastCommitResult = await git$`git log -1 --format="%aI" ${branchName}`;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
if (lastCommitResult.code === 0) {
|
package/src/solve.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { wrapDollarWithGhRetry as _wrapDollarWithGhRetry } from './github-rate-l
|
|
|
8
8
|
const feedback = await import('./solve.feedback.lib.mjs');
|
|
9
9
|
const { detectAndCountFeedback } = feedback;
|
|
10
10
|
|
|
11
|
-
export async function prepareFeedbackAndTimestamps({ prNumber, branchName: _branchName, owner, repo, issueNumber, isContinueMode: _isContinueMode, mergeStateStatus: _mergeStateStatus, prState: _prState, argv: _argv, log, formatAligned, cleanErrorMessage: _cleanErrorMessage, $ }) {
|
|
11
|
+
export async function prepareFeedbackAndTimestamps({ tempDir = null, prNumber, branchName: _branchName, owner, repo, issueNumber, isContinueMode: _isContinueMode, mergeStateStatus: _mergeStateStatus, prState: _prState, argv: _argv, log, formatAligned, cleanErrorMessage: _cleanErrorMessage, $ }) {
|
|
12
12
|
// Count new comments and detect feedback
|
|
13
13
|
let { feedbackLines } = await detectAndCountFeedback({
|
|
14
14
|
prNumber,
|
|
@@ -25,6 +25,7 @@ export async function prepareFeedbackAndTimestamps({ prNumber, branchName: _bran
|
|
|
25
25
|
formatAligned,
|
|
26
26
|
cleanErrorMessage: _cleanErrorMessage,
|
|
27
27
|
$,
|
|
28
|
+
repositoryPath: tempDir,
|
|
28
29
|
});
|
|
29
30
|
|
|
30
31
|
// Get timestamps from GitHub servers before executing the command
|
package/src/solve.watch.lib.mjs
CHANGED