1.1.2 • Published 5 years ago

gitlab-merge v1.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

npm version Maintainability npm Build Status

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:

OptionDescription
api_linkMandatory Api link of the gitlab host
private_tokenMandatory Your private token generated from gitlab. Where can I generate the private token?
project_idOptional 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_branchOptional From which branch the merge request come from (default the local active branch)
target_branchOptional Target branch to merge changes
titleOptional Title of the merge request
descriptionOptional Description of the merge request
assignee_idOptional 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´

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.

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