MCPcopy
hub / github.com/peter-evans/create-pull-request / outStreamHandler

Function outStreamHandler

src/git-command-manager.ts:427–446  ·  view source on GitHub ↗
(
  outStream: Writable,
  suppressGitCmdOutput: boolean
)

Source from the content-addressed store, hash-verified

425}
426
427const outStreamHandler = (
428 outStream: Writable,
429 suppressGitCmdOutput: boolean
430): Writable => {
431 return new stream.Writable({
432 write(chunk, _, next) {
433 if (suppressGitCmdOutput) {
434 const lines = chunk.toString().trimEnd().split('\n')
435 for (const line of lines) {
436 if (line.startsWith('[command]')) {
437 outStream.write(`${line}\n`)
438 }
439 }
440 } else {
441 outStream.write(chunk)
442 }
443 next()
444 }
445 })
446}

Callers 1

execMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected