MCPcopy Create free account
hub / github.com/electric-sql/electric / getChangedFiles

Function getChangedFiles

scripts/ci/affected-workspaces.mjs:142–156  ·  view source on GitHub ↗
(base)

Source from the content-addressed store, hash-verified

140}
141
142function getChangedFiles(base) {
143 if (!base || /^0+$/.test(base)) {
144 return []
145 }
146
147 try {
148 run(`git`, [`rev-parse`, `--verify`, `${base}^{commit}`])
149 return run(`git`, [`diff`, `--name-only`, base, `--`, `.`])
150 .split(`\n`)
151 .map((file) => file.trim())
152 .filter(Boolean)
153 } catch {
154 return []
155 }
156}
157
158function shouldRunAllWorkspaces(base, files) {
159 if (!base || /^0+$/.test(base) || files.length === 0) {

Callers 1

Calls 3

filterMethod · 0.80
runFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected