@weareikko/code-review 0.11.1 → 0.11.2

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/README.md CHANGED
@@ -107,6 +107,11 @@ permissions:
107
107
  jobs:
108
108
  review:
109
109
  runs-on: ubuntu-latest
110
+ # Fork pull requests get no secrets. Renovate pull requests need no review:
111
+ # check the author, because Renovate adds its label after it opens the PR.
112
+ if: >-
113
+ github.event.pull_request.head.repo.full_name == github.repository
114
+ && github.event.pull_request.user.login != 'renovate[bot]'
110
115
  steps:
111
116
  # Checkout (full history) is bundled — no separate checkout step needed.
112
117
  # Opt out with `checkout: false` if your job already checked out the code.
@@ -148,7 +153,7 @@ jobs:
148
153
  secrets: inherit
149
154
  ```
150
155
 
151
- It reads review settings from repo/org **variables** (`CODE_REVIEW_MODEL`, `CODE_REVIEW_DEPTH`, `CODE_REVIEW_THINKING_LEVEL`, `CODE_REVIEW_VERIFY_MODEL`) and provider credentials from **secrets** named with the `CODE_REVIEW_` prefix (e.g. `CODE_REVIEW_ANTHROPIC_API_KEY`), which the CLI's env shim de-prefixes for the provider. Optional `with:` inputs: `model` (overrides the `CODE_REVIEW_MODEL` variable), `version`, `node-version`, `working-directory`, `args`, and `runs-on`.
156
+ It reads review settings from repo/org **variables** (`CODE_REVIEW_MODEL`, `CODE_REVIEW_DEPTH`, `CODE_REVIEW_THINKING_LEVEL`, `CODE_REVIEW_VERIFY_MODEL`) and provider credentials from **secrets** named with the `CODE_REVIEW_` prefix (e.g. `CODE_REVIEW_ANTHROPIC_API_KEY`), which the CLI's env shim de-prefixes for the provider. Optional `with:` inputs: `model` (overrides the `CODE_REVIEW_MODEL` variable), `version`, `node-version`, `working-directory`, `args`, and `runs-on`. It skips pull requests from forks and pull requests opened by `renovate[bot]`.
152
157
 
153
158
  > **Caveat — `secrets: inherit` is same-organization (or enterprise) only.** Organization secrets are **not** inherited across organizations, so this pattern only works when the caller repository lives in the same org (or enterprise) as `weareikko/code-review`. Cross-organization consumers must use the **composite action** above, which references their own secrets directly. (The reusable workflow relies on `secrets: inherit` and declares no `workflow_call.secrets`, so there is no explicit-secrets path for it.)
154
159
 
@@ -525,7 +525,7 @@ var BUILTIN_SKILLS_DIR = join(dirname(fileURLToPath(import.meta.url)), "..", "sk
525
525
  */
526
526
  var BUILTIN_SKILLS = {
527
527
  repoWebUrl: PRODUCT_URL,
528
- ref: "0.11.1",
528
+ ref: "0.11.2",
529
529
  path: "packages/code-review/skills"
530
530
  };
531
531
  //#endregion
@@ -608,7 +608,7 @@ function buildSummaryBody(summary, costFooter, options = {}) {
608
608
  return `${withFooter}\n\n${buildSummaryHistoryBlock(historyEntries)}`;
609
609
  }
610
610
  function buildReviewedCommitFooter(commitSha) {
611
- return `Reviewed by ${PRODUCT_LINK} v0.11.1 for commit ${commitSha}.`;
611
+ return `Reviewed by ${PRODUCT_LINK} v0.11.2 for commit ${commitSha}.`;
612
612
  }
613
613
  function extractReviewedCommitSha(body) {
614
614
  return REVIEWED_COMMIT_FOOTER_PATTERN.exec(body)?.[1] ?? null;
@@ -2199,7 +2199,7 @@ async function connectOne(config, options) {
2199
2199
  };
2200
2200
  const client = new McpClient({
2201
2201
  name: PRODUCT_NAME,
2202
- version: "0.11.1",
2202
+ version: "0.11.2",
2203
2203
  requestTimeoutMs: MCP_CONNECT_TIMEOUT_MS
2204
2204
  });
2205
2205
  try {
@@ -4999,7 +4999,7 @@ async function loadDefaultRuntime() {
4999
4999
  const [sdkNode, resources, semconv] = modules;
5000
5000
  const serviceResource = resources.resourceFromAttributes({
5001
5001
  [semconv.ATTR_SERVICE_NAME ?? "service.name"]: SERVICE_NAME,
5002
- [semconv.ATTR_SERVICE_VERSION ?? "service.version"]: "0.11.1"
5002
+ [semconv.ATTR_SERVICE_VERSION ?? "service.version"]: "0.11.2"
5003
5003
  });
5004
5004
  applyOtelExporterDefaults(process.env);
5005
5005
  const sdk = new sdkNode.NodeSDK({ resource: resources.defaultResource().merge(serviceResource) });
@@ -5512,7 +5512,7 @@ function boldCommentTitle(body) {
5512
5512
  */
5513
5513
  function buildCommentBody(body, commitSha, confidence) {
5514
5514
  const confidenceLine = `_Confidence: ${confidence}._`;
5515
- const footer = `<sub>Reviewed by ${PRODUCT_LINK} v0.11.1 for commit ${commitSha}.</sub>`;
5515
+ const footer = `<sub>Reviewed by ${PRODUCT_LINK} v0.11.2 for commit ${commitSha}.</sub>`;
5516
5516
  return `${boldCommentTitle(body.trim())}\n\n${confidenceLine}\n\n---\n\n${footer}`;
5517
5517
  }
5518
5518
  function buildPayload(comment, body, refs, resolved) {
@@ -6697,10 +6697,10 @@ async function main(argv = process.argv.slice(2)) {
6697
6697
  return;
6698
6698
  }
6699
6699
  if (argv.includes("--version") || argv.includes("-v")) {
6700
- console.log("0.11.1");
6700
+ console.log("0.11.2");
6701
6701
  return;
6702
6702
  }
6703
- process.stderr.write(`[code-review] @weareikko/code-review v0.11.1\n`);
6703
+ process.stderr.write(`[code-review] @weareikko/code-review v0.11.2\n`);
6704
6704
  assertNodeVersion();
6705
6705
  applyCodeReviewEnvPrefix();
6706
6706
  applyDefaultCacheRetention();
@@ -6723,4 +6723,4 @@ if (isDirectRun()) main().catch((error) => {
6723
6723
  //#endregion
6724
6724
  export { fingerprints as $, toGitLabReviewSeverity as A, buildSummaryBody as B, diagnosticChannels as C, traceMcpDiagnostic as D, traceDiagnosticPhase as E, SUMMARY_HISTORY_START as F, findExistingSummaryNote as G, extractReviewedCommitSha as H, SUMMARY_MARKER as I, stripSummaryMarker as J, findExistingSummaryNoteId as K, buildArchivedSummaryEntry as L, SUMMARY_HISTORY_ENTRY_END as M, SUMMARY_HISTORY_ENTRY_START as N, MCP_DISCOVERY_MODES as O, SUMMARY_HISTORY_LIMIT as P, extractExistingFingerprints as Q, buildReviewedCommitFooter as R, createDiagnosticRunId as S, traceDiagnostic as T, extractSummaryHistoryEntries as U, buildSummaryHistoryEntries as V, findExistingReviewedCommitSha as W, appendFingerprintMarkers as X, upsertSummaryNote as Y, extractDiffHunkContext as Z, connectMcpServers as _, main as a, MCP_DIAGNOSTIC_CHANNEL_NAMES as b, withHttpStamping as c, isOtelEnabled as d, normalizeBody as et, startOtelBridge as f, parseReviewMarkdownWithWarnings as g, parseReviewMarkdown as h, formatUsageLine as i, SUMMARY_HISTORY_END as j, normalizeSeverity as k, buildGeneratedComments as l, runReview as m, formatLabelChange as n, resolveLabelChange as o, filterDiff as p, stripSummaryHistory as q, formatPerModelUsage as r, run as s, countPostedBySeverity as t, sha256 as tt, buildPayload as u, DIAGNOSTIC_CHANNEL_NAMES as v, mcpDiagnosticChannels as w, createDiagnosticContext as x, DIAGNOSTIC_CHANNEL_PREFIX as y, buildSizeNoticeBlock as z };
6725
6725
 
6726
- //# sourceMappingURL=cli-BFqDzUM6.js.map
6726
+ //# sourceMappingURL=cli-BwtNBX8-.js.map