Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/loopover-engine/src/objective-anchor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function kindsFromPath(path: string): ObjectiveAnchorChangeKind[] {
if (DOC_EXTENSIONS.has(extensionOf(path)) || segments.includes("docs") || filename.toLowerCase() === "readme.md") {
kinds.push("docs");
}
if (segments.some((segment) => CI_SEGMENTS.has(segment)) || filename.endsWith(".yml") || filename.endsWith(".yaml")) {
if (segments.some((segment) => CI_SEGMENTS.has(segment))) {
kinds.push("ci");
}
if (CONFIG_FILENAMES.has(filename) || filename.endsWith(".jsonc") || filename.endsWith(".toml")) {
Expand Down
15 changes: 15 additions & 0 deletions packages/loopover-engine/test/objective-anchor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,18 @@ test("renderObjectiveAnchorAuditMarkdown escapes markdown controls and collapses
assert.ok(markdown.includes("- src/review/\\[unsafe\\].ts"));
assert.ok(markdown.includes("- src/review/\\<unsafe\\>.ts"));
});

test("extractObjectiveAnchorFeatures does not classify non-CI YAML as ci (#8873)", () => {
const features = extractObjectiveAnchorFeatures({
paths: [".loopover.yml", "docs/mkdocs.yml", "config/app.yaml"],
});

assert.equal(features.changeKinds.includes("ci"), false);
assert.ok(features.changeKinds.includes("config"));
assert.ok(features.changeKinds.includes("docs"));

const ciWorkflow = extractObjectiveAnchorFeatures({
paths: [".github/workflows/ci.yml"],
});
assert.ok(ciWorkflow.changeKinds.includes("ci"));
});