@delfini/action-core 0.1.2 → 0.2.0

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.
@@ -53,6 +53,7 @@ function countByReason(reasons) {
53
53
  fixture: 0,
54
54
  'whitespace-only': 0,
55
55
  'import-only': 0,
56
+ ignored: 0,
56
57
  };
57
58
  for (const r of reasons)
58
59
  out[r]++;
@@ -4,6 +4,16 @@ type Octokit = InstanceType<typeof GitHub>;
4
4
  export type Enforcement = 'required' | 'warning';
5
5
  export interface PipelineInputs {
6
6
  docScope: string[];
7
+ /**
8
+ * `ignore_code_scope` — code paths whose CHANGES are ignored for analysis. A
9
+ * changed file matching any entry (dir / file / picomatch glob, same dialect
10
+ * as `docScope`) is dropped before smart-skip and before the analysis diff.
11
+ * Default `[]` (ignore nothing) — unlike `docScope`, there is NO `docs/`-style
12
+ * fallback: an empty/omitted input means exactly "ignore no code paths".
13
+ * Optional in the type so minimal test fixtures keep compiling (mirrors
14
+ * `enableDiffPreFilter`); `readPipelineInputs` always sets it explicitly.
15
+ */
16
+ ignoreCodeScope?: string[];
7
17
  enforcement: Enforcement;
8
18
  githubToken: string;
9
19
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline-inputs.d.ts","sourceRoot":"","sources":["../src/pipeline-inputs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAGvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAUnE,KAAK,OAAO,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAA;AAE1C,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,CAAA;AAEhD,MAAM,WAAW,cAAc;IAS7B,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,CAAC,EAAE,oBAAoB,CAAA;CACpC;AAED,wBAAgB,kBAAkB,IAAI,cAAc,CA2CnD"}
1
+ {"version":3,"file":"pipeline-inputs.d.ts","sourceRoot":"","sources":["../src/pipeline-inputs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAGvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAUnE,KAAK,OAAO,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAA;AAE1C,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,CAAA;AAEhD,MAAM,WAAW,cAAc;IAS7B,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,CAAC,EAAE,oBAAoB,CAAA;CACpC;AAED,wBAAgB,kBAAkB,IAAI,cAAc,CAqDnD"}
@@ -31,6 +31,14 @@ export function readPipelineInputs() {
31
31
  // yields the exact same value (`['docs']`) as the omitted-input path — no
32
32
  // trailing-slash inconsistency between the two default routes.
33
33
  const docScope = normalized.length > 0 ? normalized : normalizeDocScope(['docs/']);
34
+ // `ignore_code_scope` — same delimited-list parsing + normalizeDocScope as
35
+ // doc_scope (one dialect, ADR-2026-06-01), but NO default fallback: an
36
+ // omitted or empty input normalises to `[]` (ignore nothing). A non-empty
37
+ // input that collapses to nothing under normalisation is simply empty too —
38
+ // "ignore nothing" is a safe outcome here (no PR is silently skipped by it),
39
+ // so unlike doc_scope it needs no collapse-to-default warning.
40
+ const rawIgnoreCodeScope = core.getInput('ignore_code_scope');
41
+ const ignoreCodeScope = rawIgnoreCodeScope.length > 0 ? normalizeDocScope(rawIgnoreCodeScope.split(/[\n,]/)) : [];
34
42
  const rawEnforcement = (core.getInput('enforcement') || 'warning').toLowerCase();
35
43
  const enforcement = rawEnforcement === 'required' ? 'required' : 'warning';
36
44
  const githubToken = process.env.GITHUB_TOKEN ?? core.getInput('github_token');
@@ -38,5 +46,5 @@ export function readPipelineInputs() {
38
46
  // false: any value other than the literal "true" (case-insensitive) leaves
39
47
  // the gate off so the pre-story behaviour is the path of least resistance.
40
48
  const enableDiffPreFilter = core.getInput('enable_diff_prefilter').toLowerCase() === 'true';
41
- return { docScope, enforcement, githubToken, enableDiffPreFilter };
49
+ return { docScope, ignoreCodeScope, enforcement, githubToken, enableDiffPreFilter };
42
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delfini/action-core",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -30,7 +30,7 @@
30
30
  "@langchain/core": "^1.1.45",
31
31
  "@langchain/openai": "^1.4.5",
32
32
  "gray-matter": "^4.0.3",
33
- "@delfini/drift-engine": "0.2.1"
33
+ "@delfini/drift-engine": "0.3.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^22.10.2",