You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

git-mob-core

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-mob-core

Git Mob Core library to manage co-authoring

0.9.2-rc.0
Source
npmnpm
Version published
Weekly downloads
315
-27.92%
Maintainers
1
Weekly downloads
 
Created
Source

Git Mob core

Beta

The core API for managing Git Mob co-authors.

Shared between Git Mob CLI and Git Mob VS code.

npm i git-mob-core

API

Environment variables

  • process.env.GITMOB_MESSAGE_PATH set the primary path to Git message template
  • process.env.GITMOB_COAUTHORS_PATH set the primary path to coauthors file
// Write actions
saveNewCoAuthors(authors: Author[]): <Promise<Author[]>>
createCoAuthorsFile(authors: Author[]): <Promise<boolean>>
updateGitTemplate(selectedAuthors?: Author[]): void
solo(): <Promise<void>>
setCoAuthors(keys: string[]): <Promise<Author[]>>

// Read actions
getAllAuthors(): <Promise<Author[]>>
getPrimaryAuthor(): <Promise<Author | undefined>>
getSelectedCoAuthors(allAuthors): <Promise<Author[]>>
setPrimaryAuthor(author: Author): void
fetchGitHubAuthors(userNames: string[], userAgent: string): <Promise<Author[]>>
searchGitHubAuthors(query: string, userAgent: string): <Promise<Author[]>>
repoAuthorList(authorFilter?: string): Promise<Author[] | undefined>
pathToCoAuthors(): <Promise<string>>

gitRevParse = {
  insideWorkTree(): <Promise<string>>,
  topLevelDirectory(): <Promise<boolean>>,
};

Config

// Config manager for library
// supported prop: "processCwd" = set the directory to exec commands
getConfig(prop: string): string | undefined
updateConfig(prop: string, value: string): void

// Read GitMob properties from Git config file
gitMobConfig = {
  localTemplate(): <Promise<boolean>>,
  fetchFromGitHub(): <Promise<boolean>>,
};

// Read Git properties from Git config
gitConfig = {
  getLocalCommitTemplate(): <Promise<string>>,
  getGlobalCommitTemplate(): <Promise<string>>,
};

Author class

Main class for Author data exchange between function.

class Author;

// Properties
Author.key: string
Author.name: string
Author.email: string

//Methods
Author.format(): string
Author.toString(): string

Keywords

cli

FAQs

Package last updated on 06 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.