MCPcopy Create free account
hub / github.com/PostHog/duckgres / add_file_delta

Function add_file_delta

scripts/test_impact_plan.py:127–157  ·  view source on GitHub ↗
(plan: TestImpactPlan, status: str, path: str)

Source from the content-addressed store, hash-verified

125
126
127def add_file_delta(plan: TestImpactPlan, status: str, path: str) -> None:
128 if is_test_file(path):
129 plan.changed_test_files.append(path)
130 if status == "A":
131 plan.file_deltas.test_added += 1
132 elif status == "D":
133 plan.file_deltas.test_deleted += 1
134 plan.deleted_test_files.append(path)
135 else:
136 plan.file_deltas.test_changed += 1
137
138 if is_e2e_or_journey_file(path):
139 plan.changed_e2e_files.append(path)
140 if status == "A":
141 plan.file_deltas.e2e_added += 1
142 elif status == "D":
143 plan.file_deltas.e2e_deleted += 1
144 else:
145 plan.file_deltas.e2e_changed += 1
146
147 if is_workflow_file(path):
148 plan.changed_workflow_files.append(path)
149 if status == "A":
150 plan.file_deltas.workflow_added += 1
151 elif status == "D":
152 plan.file_deltas.workflow_deleted += 1
153 else:
154 plan.file_deltas.workflow_changed += 1
155
156 if is_runner_file(path) and status != "A":
157 plan.file_deltas.runner_changed += 1
158
159
160def account_rename(

Callers 2

analyze_diffFunction · 0.85
analyze_github_pr_filesFunction · 0.85

Calls 4

is_test_fileFunction · 0.85
is_e2e_or_journey_fileFunction · 0.85
is_workflow_fileFunction · 0.85
is_runner_fileFunction · 0.85

Tested by

no test coverage detected