@polka-codes/cli 0.9.14 → 0.9.15
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/dist/index.js +6 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39790,7 +39790,7 @@ var {
|
|
|
39790
39790
|
Help
|
|
39791
39791
|
} = import__.default;
|
|
39792
39792
|
// package.json
|
|
39793
|
-
var version = "0.9.
|
|
39793
|
+
var version = "0.9.15";
|
|
39794
39794
|
|
|
39795
39795
|
// ../../node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
39796
39796
|
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
|
@@ -110986,17 +110986,16 @@ async function reviewPR(prIdentifier, spinner, sharedAiOptions, isJsonOutput, co
|
|
|
110986
110986
|
process.exit(1);
|
|
110987
110987
|
}
|
|
110988
110988
|
spinner.text = "Fetching pull request details...";
|
|
110989
|
-
const prDetails = JSON.parse(execSync3(`gh pr view ${prNumber} --json title,body,commits`, { encoding: "utf-8" }));
|
|
110990
|
-
const defaultBranch = execSync3("gh repo view --json defaultBranchRef --jq .defaultBranchRef.name", {
|
|
110991
|
-
encoding: "utf-8"
|
|
110992
|
-
}).trim();
|
|
110989
|
+
const prDetails = JSON.parse(execSync3(`gh pr view ${prNumber} --json title,body,commits,baseRefName,baseRefOid`, { encoding: "utf-8" }));
|
|
110993
110990
|
const commitMessages = prDetails.commits.map((c) => c.messageBody).join(`
|
|
110994
110991
|
---
|
|
110995
110992
|
`);
|
|
110996
110993
|
spinner.text = "Getting file changes...";
|
|
110997
110994
|
let changedFiles = [];
|
|
110998
110995
|
try {
|
|
110999
|
-
const diffNameStatus = execSync3(`git diff --name-status --no-color ${
|
|
110996
|
+
const diffNameStatus = execSync3(`git diff --name-status --no-color ${prDetails.baseRefOid}...HEAD`, {
|
|
110997
|
+
encoding: "utf-8"
|
|
110998
|
+
});
|
|
111000
110999
|
changedFiles = parseGitDiffNameStatus(diffNameStatus);
|
|
111001
111000
|
} catch (_error) {
|
|
111002
111001
|
console.warn("Warning: Could not retrieve file changes list");
|
|
@@ -111004,7 +111003,7 @@ async function reviewPR(prIdentifier, spinner, sharedAiOptions, isJsonOutput, co
|
|
|
111004
111003
|
printChangedFiles(changedFiles, spinner, isJsonOutput);
|
|
111005
111004
|
spinner.text = "Generating review...";
|
|
111006
111005
|
const result = await reviewDiff(sharedAiOptions, {
|
|
111007
|
-
commitRange: `${
|
|
111006
|
+
commitRange: `${prDetails.baseRefOid}...HEAD`,
|
|
111008
111007
|
pullRequestTitle: prDetails.title,
|
|
111009
111008
|
pullRequestDescription: prDetails.body,
|
|
111010
111009
|
commitMessages,
|