Skip to content

PersistentAI API Documentation / @persistentai/fireflow-vfs / server / GitWorkflows

Class: GitWorkflows

Defined in: packages/fireflow-vfs/src/workflows/git-workflows.ts:36

Git workflows class

Extends

  • ConfiguredInstance

Constructors

Constructor

new GitWorkflows(db, name?): GitWorkflows

Defined in: packages/fireflow-vfs/src/workflows/git-workflows.ts:37

Parameters

db

DB

name?

string = 'GitWorkflows'

Returns

GitWorkflows

Overrides

ConfiguredInstance.constructor

Properties

name

readonly name: string

Defined in: node_modules/.pnpm/@dbos-inc+dbos-sdk@4.7.9_bufferutil@4.0.9_pg-native@3.5.2_utf-8-validate@5.0.10/node_modules/@dbos-inc/dbos-sdk/dist/src/decorators.d.ts:126

Inherited from

ConfiguredInstance.name

Methods

checkoutFile()

checkoutFile(workspaceId, branchName, path, commitId, userId): Promise<void>

Defined in: packages/fireflow-vfs/src/workflows/git-workflows.ts:323

Checkout file from specific commit

This restores a file from a historical commit to the current branch

Parameters

workspaceId

string

branchName

string

path

string

commitId

string

userId

string

Returns

Promise<void>


commit()

commit(workspaceId, branchName, message, userId): Promise<Commit>

Defined in: packages/fireflow-vfs/src/workflows/git-workflows.ts:52

Commit staged changes

Steps:

  1. Permission check
  2. Create commit in lakeFS
  3. Emit event

Parameters

workspaceId

string

branchName

string

message

string

userId

string

Returns

Promise<Commit>

Full Commit object from lakeFS


createBranch()

createBranch(workspaceId, branchName, sourceBranch, userId): Promise<Ref>

Defined in: packages/fireflow-vfs/src/workflows/git-workflows.ts:119

Create branch

Steps:

  1. Permission check
  2. Create branch in lakeFS
  3. Emit event

Parameters

workspaceId

string

branchName

string

sourceBranch

string

userId

string

Returns

Promise<Ref>

Full Ref object with id and commit_id


deleteBranch()

deleteBranch(workspaceId, branchName, userId): Promise<void>

Defined in: packages/fireflow-vfs/src/workflows/git-workflows.ts:178

Delete branch

Steps:

  1. Permission check
  2. Delete branch in lakeFS
  3. Emit event

Parameters

workspaceId

string

branchName

string

userId

string

Returns

Promise<void>


getStatus()

getStatus(workspaceId, branchName, userId): Promise<DiffList>

Defined in: packages/fireflow-vfs/src/workflows/git-workflows.ts:299

Get uncommitted changes (status)

Steps:

  1. Permission check
  2. Get status from lakeFS

Parameters

workspaceId

string

branchName

string

userId

string

Returns

Promise<DiffList>

Full DiffList with pagination and all diff details


initialize()

initialize(): Promise<void>

Defined in: node_modules/.pnpm/@dbos-inc+dbos-sdk@4.7.9_bufferutil@4.0.9_pg-native@3.5.2_utf-8-validate@5.0.10/node_modules/@dbos-inc/dbos-sdk/dist/src/decorators.d.ts:131

Override this method to perform async initialization between construction and DBOS.launch().

Returns

Promise<void>

Inherited from

ConfiguredInstance.initialize


mergeBranch()

mergeBranch(workspaceId, sourceBranch, targetBranch, message, userId): Promise<MergeResult | { conflicts: string[]; }>

Defined in: packages/fireflow-vfs/src/workflows/git-workflows.ts:235

Merge branches

Steps:

  1. Permission check
  2. Attempt merge in lakeFS
  3. Emit event (if successful)

Parameters

workspaceId

string

sourceBranch

string

targetBranch

string

message

string

userId

string

Returns

Promise<MergeResult | { conflicts: string[]; }>

MergeResult with reference, or conflicts array if merge failed

Licensed under BUSL-1.1