Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.1 KB

git-commit-command.md

File metadata and controls

57 lines (38 loc) · 1.1 KB

GitCommitCommand

A Git command that stages and commits files.

Config

Type: object literal

Optional properties are denoted by *
actor*

Type: string
Default: undefined

A short-hand to perform the commit using a specific author & committer email and name.

Example:

/*
 * The value must be in author format: "NAME <EMAIL>"
 */
{ gitActor: "bot <[email protected]>" }
It is also possible to explicitly use the equivalent environment variables:

GIT_COMMITTER_NAME: bot
GIT_COMMITTER_EMAIL: [email protected]
GIT_AUTHOR_NAME: bot
GIT_AUTHOR_EMAIL: [email protected]
commitMessage

Type: string

filePaths

Type: Set

ℹ️   ExecCommand options are also applicable.

Example

const { Commands } = require("@abstracter/atomic-release");

const command = new Commands.GitCommitCommand({
  actor: "bot <[email protected]>",
  commitMessage: "ci: adding files generated during CI/CD",
  workingDirectory: "/home/rick.sanchez/my-awesome-node-project",
  filePaths: new Set(["path/relative/to/working/directory/file.txt"]),
});