gitlab-merge

1.1.2 • Public • Published

gitlab-merge

First Gitlab guided CLI to create your merge request from terminal
Don't change anymore context to open a merge request 👨🏻‍💻


npm version Maintainability npm Build Status

gitlab-merge

Install

$ npm install -g gitlab-merge

Usage

Create your configuration file. gitlab-merge uses cosmiconfig for configuration file support. This means you can configure cca via:

  • A .gitlab-mergerc file, written in YAML or JSON, with optional extensions: .yaml/.yml/.json.
  • A gitlab-merge.config.js file that exports an object.
  • A "gitlab-merge" key in your package.json file.

The configuration file will be resolved starting from the root of your project, and searching up the file tree until a config file is (or isn't) found.

{
  "api_link": "https://gitlab.example.com/api/v4/",
  "private_token": "XXX"
}

Launch from terminal:

cd ~/my-projects
$ gitlab-merge

Configuration

Currently supported options are:

Option Description
api_link Mandatory Api link of the gitlab host
private_token Mandatory Your private token generated from gitlab. Where can I generate the private token?
project_id Optional Project id for the destionation of the merge request. If you don't set the project_id in the configuration file the tool at the beginning fetch ALL the list of the project hosted to the api_link provided. Where can I find the project id in Gitlab?
source_branch Optional From which branch the merge request come from (default the local active branch)
target_branch Optional Target branch to merge changes
title Optional Title of the merge request
description Optional Description of the merge request
assignee_id Optional Assignee id of the merge request. If you put none the MR will be unassigned

You can add to your config file the options that you want, here is the list.

Where can I generate the private token?

Very simple! go to your user settings in Gitlab at ´https://XXXXXXX/profile´

gitlab-merge

Where can I find the project id in Gitlab?

You can find the project id of your project in the details tab of the repo.

gitlab-merge

Contributing

Check the issue list to contribute on some activities or to advice new features! The library is open to everybody, contribute improve your skills.

gitlab-merge is maintained under the Semantic Versioning guidelines.

Use npm run watch while coding.

Contributors

License

MIT © Christian Varisco

Dependents (0)

Package Sidebar

Install

npm i gitlab-merge

Weekly Downloads

0

Version

1.1.2

License

MIT

Unpacked Size

47.3 kB

Total Files

9

Last publish

Collaborators

  • cvarisco