Git
Module to generate git related entries.
Branch
Generates a random branch name.
Returns: string
faker.git.branch(): string
faker.git.branch() // => "hard-drive-quantify"
faker.git.branch() // 'feed-parse'
Commit Entry
Generates a random commit entry.
Parameters
Name | Type | Default | Description |
---|---|---|---|
options | { ... } | {} | Options for the commit entry. |
options.eol? | 'CRLF' | 'LF' | Choose the end of line character to use. Defaults to 'CRLF'. 'LF' = '\n', 'CRLF' = '\r\n' | |
options.merge? | boolean | Set to |
Returns: string
faker.git.commitEntry(options: {
eol: 'CRLF' | 'LF',
merge: boolean
} = {}): string
faker.git.commitEntry() // => "commit 89bd9d8d69a674e0f467cc8796ed151a05dfc2d...
faker.git.commitEntry()
// commit fe8c38a965d13d9794eb36918cb24cebe49a45c2
// Author: Mable Harvey <Cynthia_Quigley@yahoo.com>
// Date: Sat Feb 05 2022 15:09:18 GMT+0100 (Mitteleuropäische Normalzeit)
//
// copy primary system
Commit Message
Generates a random commit message.
Returns: string
faker.git.commitMessage(): string
faker.git.commitMessage() // => "generate multi-byte monitor"
faker.git.commitMessage() // 'reboot cross-platform driver'
Commit Sha
Generates a random commit sha (full).
Returns: string
faker.git.commitSha(): string
faker.git.commitSha() // => "89bd9d8d69a674e0f467cc8796ed151a05dfc2dd"
faker.git.commitSha() // '2c6e3880fd94ddb7ef72d34e683cdc0c47bec6e6'
Short Sha
Generates a random commit sha (short).
Returns: string
faker.git.shortSha(): string
faker.git.shortSha() // => "89bd9d8"
faker.git.shortSha() // '6155732'