@weareikko/code-review 0.10.2 → 0.10.3

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.
@@ -1772,7 +1772,7 @@ function buildSummaryBody(summary, costFooter, options = {}) {
1772
1772
  return `${withFooter}\n\n${buildSummaryHistoryBlock(historyEntries)}`;
1773
1773
  }
1774
1774
  function buildReviewedCommitFooter(commitSha) {
1775
- return `Reviewed by ${PRODUCT_LINK} v0.10.2 for commit ${commitSha}.`;
1775
+ return `Reviewed by ${PRODUCT_LINK} v0.10.3 for commit ${commitSha}.`;
1776
1776
  }
1777
1777
  function extractReviewedCommitSha(body) {
1778
1778
  return REVIEWED_COMMIT_FOOTER_PATTERN.exec(body)?.[1] ?? null;
@@ -3387,7 +3387,7 @@ async function connectOne(config, options) {
3387
3387
  };
3388
3388
  const client = new McpClient({
3389
3389
  name: PRODUCT_NAME,
3390
- version: "0.10.2",
3390
+ version: "0.10.3",
3391
3391
  requestTimeoutMs: MCP_CONNECT_TIMEOUT_MS
3392
3392
  });
3393
3393
  try {
@@ -7061,7 +7061,7 @@ async function loadDefaultRuntime() {
7061
7061
  const [sdkNode, resources, semconv] = modules;
7062
7062
  const serviceResource = resources.resourceFromAttributes({
7063
7063
  [semconv.ATTR_SERVICE_NAME ?? "service.name"]: SERVICE_NAME,
7064
- [semconv.ATTR_SERVICE_VERSION ?? "service.version"]: "0.10.2"
7064
+ [semconv.ATTR_SERVICE_VERSION ?? "service.version"]: "0.10.3"
7065
7065
  });
7066
7066
  applyOtelExporterDefaults(process.env);
7067
7067
  const sdk = new sdkNode.NodeSDK({ resource: resources.defaultResource().merge(serviceResource) });
@@ -7574,7 +7574,7 @@ function boldCommentTitle(body) {
7574
7574
  */
7575
7575
  function buildCommentBody(body, commitSha, confidence) {
7576
7576
  const confidenceLine = `_Confidence: ${confidence}._`;
7577
- const footer = `<sub>Reviewed by ${PRODUCT_LINK} v0.10.2 for commit ${commitSha}.</sub>`;
7577
+ const footer = `<sub>Reviewed by ${PRODUCT_LINK} v0.10.3 for commit ${commitSha}.</sub>`;
7578
7578
  return `${boldCommentTitle(body.trim())}\n\n${confidenceLine}\n\n---\n\n${footer}`;
7579
7579
  }
7580
7580
  function buildPayload(comment, body, refs, resolved) {
@@ -8226,7 +8226,7 @@ function gitRepoWebUrl(cloneUrl) {
8226
8226
  */
8227
8227
  function skillSourceUrl(origin, context = {}) {
8228
8228
  switch (origin.kind) {
8229
- case "builtin": return blobUrl(PRODUCT_URL, "0.10.2", `skills/${origin.name}/SKILL.md`);
8229
+ case "builtin": return blobUrl(PRODUCT_URL, "0.10.3", `skills/${origin.name}/SKILL.md`);
8230
8230
  case "project":
8231
8231
  if (!context.projectWebUrl || !context.commitSha) return void 0;
8232
8232
  return blobUrl(context.projectWebUrl, context.commitSha, `${origin.path}/SKILL.md`);
@@ -8657,6 +8657,30 @@ async function run(config, bridges) {
8657
8657
  summary: null
8658
8658
  };
8659
8659
  }
8660
+ let draftsPublishFailed = 0;
8661
+ let raceLost = 0;
8662
+ const posted = await traceDiagnosticPhase("scm.post_comments", config, runId, withHttpStamping(() => platform.lastResponse(), async (context) => {
8663
+ const result = await platform.postComments(generated, config.postingMode);
8664
+ recordCommentCounts(context, generated);
8665
+ context.posted = result.posted;
8666
+ if (result.drafts) {
8667
+ context.draftsAbandoned = result.drafts.abandoned;
8668
+ context.draftsCreated = result.drafts.created;
8669
+ context.draftsDeletedPrePublish = result.drafts.deletedPrePublish;
8670
+ context.draftsPublished = result.drafts.published;
8671
+ context.draftsPublishFailed = result.drafts.publishFailed;
8672
+ draftsPublishFailed = result.drafts.publishFailed;
8673
+ raceLost = result.drafts.deletedPrePublish;
8674
+ }
8675
+ return result.posted;
8676
+ }));
8677
+ const duplicates = generated.length - newCount;
8678
+ const raceExtra = raceLost > 0 ? `, ${raceLost} dropped by pre-publish re-check` : "";
8679
+ console.log(`Posted ${posted} new review comment(s) (${duplicates} duplicates skipped${raceExtra}).`);
8680
+ if (draftsPublishFailed > 0) console.warn(`[code-review] ${draftsPublishFailed} comment(s) could not be published individually after bulk_publish failed and were dropped.`);
8681
+ runContext.posted = posted;
8682
+ runContext.draftsPublishFailed = draftsPublishFailed;
8683
+ if (posted > 0) runContext.postedBySeverity = countPostedBySeverity(generated);
8660
8684
  let summary = null;
8661
8685
  if (config.postSummary && parsed.summary) {
8662
8686
  summary = await traceDiagnosticPhase("scm.upsert_summary", config, runId, withHttpStamping(() => platform.lastResponse(), async (context) => {
@@ -8688,30 +8712,6 @@ async function run(config, bridges) {
8688
8712
  runContext.summaryNoteId = summary.noteId;
8689
8713
  console.log(summary.action === "updated" ? `Updated MR summary note (id ${summary.noteId}).` : `Posted MR summary note (id ${summary.noteId}).`);
8690
8714
  } else if (config.postSummary && !parsed.summary) console.log("No summary returned by the reviewer; skipping summary note.");
8691
- let draftsPublishFailed = 0;
8692
- let raceLost = 0;
8693
- const posted = await traceDiagnosticPhase("scm.post_comments", config, runId, withHttpStamping(() => platform.lastResponse(), async (context) => {
8694
- const result = await platform.postComments(generated, config.postingMode);
8695
- recordCommentCounts(context, generated);
8696
- context.posted = result.posted;
8697
- if (result.drafts) {
8698
- context.draftsAbandoned = result.drafts.abandoned;
8699
- context.draftsCreated = result.drafts.created;
8700
- context.draftsDeletedPrePublish = result.drafts.deletedPrePublish;
8701
- context.draftsPublished = result.drafts.published;
8702
- context.draftsPublishFailed = result.drafts.publishFailed;
8703
- draftsPublishFailed = result.drafts.publishFailed;
8704
- raceLost = result.drafts.deletedPrePublish;
8705
- }
8706
- return result.posted;
8707
- }));
8708
- const duplicates = generated.length - newCount;
8709
- const raceExtra = raceLost > 0 ? `, ${raceLost} dropped by pre-publish re-check` : "";
8710
- console.log(`Posted ${posted} new review comment(s) (${duplicates} duplicates skipped${raceExtra}).`);
8711
- if (draftsPublishFailed > 0) console.warn(`[code-review] ${draftsPublishFailed} comment(s) could not be published individually after bulk_publish failed and were dropped.`);
8712
- runContext.posted = posted;
8713
- runContext.draftsPublishFailed = draftsPublishFailed;
8714
- if (posted > 0) runContext.postedBySeverity = countPostedBySeverity(generated);
8715
8715
  const labelChange = resolveLabelChange(config, posted > 0);
8716
8716
  if (labelChange) try {
8717
8717
  await platform.updateLabels(labelChange.add, labelChange.remove);
@@ -8894,10 +8894,10 @@ async function main(argv = process.argv.slice(2)) {
8894
8894
  return;
8895
8895
  }
8896
8896
  if (argv.includes("--version") || argv.includes("-v")) {
8897
- console.log("0.10.2");
8897
+ console.log("0.10.3");
8898
8898
  return;
8899
8899
  }
8900
- process.stderr.write(`[code-review] @weareikko/code-review v0.10.2\n`);
8900
+ process.stderr.write(`[code-review] @weareikko/code-review v0.10.3\n`);
8901
8901
  assertNodeVersion();
8902
8902
  applyCodeReviewEnvPrefix();
8903
8903
  applyDefaultCacheRetention();
@@ -8920,4 +8920,4 @@ if (isDirectRun()) main().catch((error) => {
8920
8920
  //#endregion
8921
8921
  export { buildSummaryHistoryEntries as $, connectMcpServers as A, traceMcpDiagnostic as B, findSkillForPath as C, readToolPath as D, formatSkillUsageState as E, createDiagnosticRunId as F, SUMMARY_HISTORY_ENTRY_START as G, toGitLabReviewSeverity as H, diagnosticChannels as I, SUMMARY_MARKER as J, SUMMARY_HISTORY_LIMIT as K, mcpDiagnosticChannels as L, DIAGNOSTIC_CHANNEL_PREFIX as M, MCP_DIAGNOSTIC_CHANNEL_NAMES as N, parseReviewMarkdown as O, createDiagnosticContext as P, buildSummaryBody as Q, traceDiagnostic as R, createSkillReadCounter as S, formatReviewUsageSummary as T, SUMMARY_HISTORY_END as U, normalizeSeverity as V, SUMMARY_HISTORY_ENTRY_END as W, buildReviewedCommitFooter as X, buildArchivedSummaryEntry as Y, buildSizeNoticeBlock as Z, buildPayload as _, resolveNpmSkillDir as _t, formatSkillsFooter as a, stripSummaryHistory as at, filterDiff as b, resolveLabelChange as c, appendFingerprintMarkers as ct, blobUrl as d, fingerprints as dt, extractReviewedCommitSha as et, formatSkillLink as f, normalizeBody as ft, buildGeneratedComments as g, parseSkillSpec as gt, skillSourceUrl as h, loadNamedSkill as ht, formatPerModelUsage as i, findExistingSummaryNoteId as it, DIAGNOSTIC_CHANNEL_NAMES as j, parseReviewMarkdownWithWarnings as k, run as l, extractDiffHunkContext as lt, skillDisplayName as m, gitSkillCacheKey as mt, formatLabelChange as n, findExistingReviewedCommitSha as nt, formatUsageLine as o, stripSummaryMarker as ot, gitRepoWebUrl as p, sha256 as pt, SUMMARY_HISTORY_START as q, formatMcpFooter as r, findExistingSummaryNote as rt, main as s, upsertSummaryNote as st, countPostedBySeverity as t, extractSummaryHistoryEntries as tt, withHttpStamping as u, extractExistingFingerprints as ut, isOtelEnabled as v, resolveSkillCacheDir as vt, formatMcpUsageState as w, runReview as x, startOtelBridge as y, traceDiagnosticPhase as z };
8922
8922
 
8923
- //# sourceMappingURL=cli-D_wubGGT.js.map
8923
+ //# sourceMappingURL=cli-CIKr0_zd.js.map