@skypilot/nodegit-tools
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

@skypilot/nodegit-tools

build  npm stable  npm next  license: ISC

A collection of utilities for working with NodeGit

Functions

Commit functions

findCommitByBranchName

async findCommitByBranchName(branchName: string, { repository?: Repository }): Promise<Commit>

findCommitByOid

async findCommitByOid(oid: Oid, { repository?: Repository }): Promise<Commit>

findCommitByReference

async findCommitByReference(reference: Reference, { repository?: Repository }): Promise<Commit>

findCommitBySha

async findCommitBySha(sha: string, { repository?: Repository }): Promise<Commit>

findCommitByTagName

async findCommitByTagName(tagName: string, { repository?: Repository }): Promise<Commit>

findRangeOfCommitsByOid

async findRangeOfCommitsByOid(newestOid: Oid, oldestOid: Oid, { repository?: Repository }): Promise<Commit[]>

findRangeOfCommitsBySha

async findRangeOfCommitsBySha(newestSha: string, oldestSha: string, { repository?: Repository }): Promise<Commit[]>

getCommitOid

getCommitOid(commit: Commit): Oid

getCommitRecord

getCommitRecord(commit: Commit): { date: Date, message: string, sha: string } 

retrieveHeadCommit

async retrieveHeadCommit({ repository?: Repository }): Promise<Commit>

Oid (object ID) functions

findMergeBaseOid

async findMergBaseOid(oidA: Oid, oidB: Oid, { repository?: Repository }): Promise<Oid>

findOidBySha

async findOidBySha(sha: string, { repository?: Repository }): Promise<Oid>

getOidSha

getOidSha(oid: Oid): string

Reference functions

findReferenceByTagName

async findReferenceByTagName(tagName: string, { repository?: Repository }): Promise<Reference>

getReferenceShorthand

getReferenceShorthand(reference: Reference): string

retrieveCurrentBranchName

async retrieveCurrentBranchName({ repository?: Repository }): Promise<Reference>

retrieveCurrentBranchReference

async retrieveCurrentBranchReference({ repository?: Repository }): Promise<Reference>

Repo functions

openRepo

async openRepository({ path?: string }): Promise<Repository>

Tag functions

async retrieveTagNames({ repository?: Repository }): Promise<string[]>

Package Sidebar

Install

npm i @skypilot/nodegit-tools

Weekly Downloads

24

Version

1.0.7

License

ISC

Unpacked Size

34.9 kB

Total Files

69

Last publish

Collaborators

  • williamthorsen