@kody-ade/kody-engine-lite 0.1.82 → 0.1.83
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/bin/cli.js +6 -4
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -717,8 +717,10 @@ function submitPRReview(prNumber, body, event) {
|
|
|
717
717
|
{ input: body }
|
|
718
718
|
);
|
|
719
719
|
logger.info(` PR review submitted on #${prNumber}: ${event}`);
|
|
720
|
+
return true;
|
|
720
721
|
} catch (err) {
|
|
721
722
|
logger.warn(` Failed to submit PR review: ${err}`);
|
|
723
|
+
return false;
|
|
722
724
|
}
|
|
723
725
|
}
|
|
724
726
|
function getCIFailureLogs(runId, maxLength = 8e3) {
|
|
@@ -3960,10 +3962,10 @@ async function main() {
|
|
|
3960
3962
|
if (!input.local && prNumber) {
|
|
3961
3963
|
const comment = formatReviewComment(result.reviewContent, taskId);
|
|
3962
3964
|
const verdict = detectReviewVerdict(result.reviewContent);
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3965
|
+
const event = verdict === "fail" ? "request-changes" : "approve";
|
|
3966
|
+
const posted = submitPRReview(prNumber, comment, event);
|
|
3967
|
+
if (!posted) {
|
|
3968
|
+
postPRComment(prNumber, comment);
|
|
3967
3969
|
}
|
|
3968
3970
|
}
|
|
3969
3971
|
}
|