Files
copilotkit__copilotkit/dangerfile.js
Markus Ecker 036d5412cc refactor!: restructure repo for v1.x and add v2.x (#2794)
- Move original CopilotKit/CopilotKit directory to src/v1.x
- Introduce new v2 interfaces in src/v2.x
- Align CI paths and preview environments to new layout

Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
Co-authored-by: Ran Shemtov <ran@copilotkit.ai>
Co-authored-by: Brandon McConnell <brandon@dreamthinkbuild.com>
Co-authored-by: Mike Ryan <mike.ryan52@gmail.com>
2025-12-18 13:09:14 -05:00

23 lines
833 B
JavaScript

import { danger, warn } from "danger";
const file1 = "sdk-python/copilotkit/langgraph_agent.py";
const file2 = "src/v1.x/packages/sdk-js/src/langgraph.ts";
// Get the list of modified files in the PR
const changedFiles = danger.git.modified_files;
const lgPyExecutorName = "LangGraph python executor (langgraph_agent.py)";
const lgcExecutor = "LangGraph Cloud executor (remote-lg-cloud-action.ts)";
// Check if only one of the files is modified
if (changedFiles.includes(file1) && !changedFiles.includes(file2)) {
warn(
`⚠️ ${lgPyExecutorName} was modified, but ${lgcExecutor} was not updated. Please align both files.`
);
}
if (changedFiles.includes(file2) && !changedFiles.includes(file1)) {
warn(
`⚠️ ${lgcExecutor} was modified, but ${lgPyExecutorName} was not updated. Please align both files.`
);
}