fromGitPoll()
Poll a Git repository for new commits and emit commit-shaped graph events.
Import
Section titled “Import”import { fromGitPoll } from "@graphrefly/ts/sources/node";Signature
Section titled “Signature”function fromGitPoll( repoPath: string, opts: FromGitPollOptions = {},): Operator<never, GitEvent>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
repoPath | string | Path to the Git repository to poll. |
opts | FromGitPollOptions | Poll interval, include/exclude file filters, error tolerance, and cancellation signal. |
Returns
Section titled “Returns”A node-only source operator that emits GitEvent values after the initial baseline commit.
Example
Section titled “Example”import { graph } from "@graphrefly/ts/graph";import { fromGitPoll } from "@graphrefly/ts/sources/node";
const g = graph();const commits = g.initNode(fromGitPoll(process.cwd(), { include: ["packages/**"] }), []);Source
Section titled “Source”packages/ts/src/sources/node.ts