# git-auto-merger

> A CLI to help merge branches into other branches and send alerts if they fail.

Latest version **2.3.0** (published 2023-06-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-auto-merger
pnpm add git-auto-merger
yarn add git-auto-merger
bun add git-auto-merger
```

Provides the command `git-auto-merger`.

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.3.0 |
| Published | 2023-06-25 |
| First published | 2022-12-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=16.0.0 |
| Dependencies | 6 |
| Unpacked size | 40 KB |
| Known vulnerabilities | 0 (+12 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kerren Ortlepp @Kerren-Entrostat |
| Maintainers | entrostat-developer |
| Keywords | oclif, cli, git, merge, ci, cd, pipeline, git-flow, auto-merge |

## Links

- npm: https://www.npmjs.com/package/git-auto-merger
- Repository: https://github.com/entrostat/git-auto-merger
- Issues: https://github.com/entrostat/git-auto-merger/issues
- npm.io page: https://npm.io/package/git-auto-merger

## Dependencies (6)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.1.0
- [nodemailer](https://npm.io/package/nodemailer.md) ^6.8.0
- [@oclif/core](https://npm.io/package/@oclif/core.md) ^1.21.0
- [@oclif/plugin-help](https://npm.io/package/@oclif/plugin-help.md) ^5
- [@oclif/plugin-plugins](https://npm.io/package/@oclif/plugin-plugins.md) ^2.1.7

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 2.3.0 (latest) — 2023-06-25
- 2.2.0 — 2023-06-25
- 2.1.0 — 2023-06-25
- 2.0.12 — 2023-06-25
- 2.0.11 — 2023-06-25
- 2.0.10 — 2023-06-25
- 2.0.9 — 2023-06-25
- 2.0.8 — 2023-06-25
- 2.0.7 — 2023-06-25
- 2.0.6 — 2023-06-25
- 2.0.5 — 2023-06-25
- 2.0.4 — 2023-06-25
- 2.0.3 — 2023-06-25
- 2.0.2 — 2022-12-27
- 2.0.1 — 2022-12-27
- … 11 more at https://npm.io/package/git-auto-merger/versions

## README

git-auto-merger
=================

This CLI helps to create an auto-merge functionality for git. When it fails to merge (due to conflicts), you can send an alert out.

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/oclif-hello-world.svg)](https://npmjs.org/package/oclif-hello-world)
[![CircleCI](https://circleci.com/gh/oclif/hello-world/tree/main.svg?style=shield)](https://circleci.com/gh/oclif/hello-world/tree/main)
[![Downloads/week](https://img.shields.io/npm/dw/oclif-hello-world.svg)](https://npmjs.org/package/oclif-hello-world)
[![License](https://img.shields.io/npm/l/oclif-hello-world.svg)](https://github.com/oclif/hello-world/blob/main/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g git-auto-merger
$ git-auto-merger COMMAND
running command...
$ git-auto-merger (--version)
git-auto-merger/2.3.0 linux-x64 node-v16.19.0
$ git-auto-merger --help [COMMAND]
USAGE
  $ git-auto-merger COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`git-auto-merger help [COMMAND]`](#git-auto-merger-help-command)
* [`git-auto-merger merge`](#git-auto-merger-merge)
* [`git-auto-merger set credentials smtp`](#git-auto-merger-set-credentials-smtp)

## `git-auto-merger help [COMMAND]`

Display help for git-auto-merger.

```
USAGE
  $ git-auto-merger help [COMMAND] [-n]

ARGUMENTS
  COMMAND  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for git-auto-merger.
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.19/src/commands/help.ts)_

## `git-auto-merger merge`

Tries to merge the base branch into all of the other ones that have been specified or match a pattern.

```
USAGE
  $ git-auto-merger merge -b <value> [-e <value>] [-i <value>] [-m <value> -P <value>] [-c] [-P]

FLAGS
  -P, --project-name=<value>        The name of the project when sending the notification
  -P, --push-commit                 Push the changes of the merge
  -b, --base-branch=<value>         (required) The base branch that we want to merge into other branches
  -c, --commit                      Commit the changes when the merge takes place
  -e, --exclude-pattern=<value>...  The regex pattern(s) to exclude when running a merge. For example: ^main$
  -i, --include-pattern=<value>...  The regex patterns(s) to include when running a merge. For example: feature.+
  -m, --notify-email=<value>...     Send a notification via SMTP if the merge cannot take place

DESCRIPTION
  Tries to merge the base branch into all of the other ones that have been specified or match a pattern.

  Exclusion takes preference over inclusion, so we will ignore a branch if it triggers in the include and exclude
  patterns.

EXAMPLES
  $ git-auto-merger merge --base-branch=develop --include-pattern='develop
 --include-pattern='feature/.*' --exclude-pattern='main' --notify-email="dev@example.com" --project-name=Test
```

_See code: [dist/commands/merge.ts](https://github.com/entrostat/git-auto-merger/blob/v2.3.0/dist/commands/merge.ts)_

## `git-auto-merger set credentials smtp`

Set the SMTP credentials that should be used to send the alert

```
USAGE
  $ git-auto-merger set credentials smtp -h <value> -u <value> -p <value> -P <value> -f <value> [-s]

FLAGS
  -P, --port=<value>      (required) The SMTP port to use
  -f, --from=<value>      (required) The from email address
  -h, --host=<value>      (required) The SMTP host to connect to
  -p, --password=<value>  (required) The email password
  -s, --tls               TLS enabled
  -u, --username=<value>  (required) The email username

DESCRIPTION
  Set the SMTP credentials that should be used to send the alert

EXAMPLES
  $ git-auto-merger set credentials smtp  --host=smtp.postmarkapp.com --port=587 --username=xxxxx-xxxxx-xxxxx --password=xxxxx-xxxxx-xxxxx --tls --from=info@example.com
```
<!-- commandsstop -->

---
_Source: https://npm.io/package/git-auto-merger · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
