I made a guided CLI to create your merge request for Gitlab from your terminal
source link: https://www.tuicool.com/articles/hit/mAVjqeR
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
First Gitlab guided CLI to create your merge request from terminal
Don't change anymore context to open a merge request :man|type_1_2::computer:
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 yourpackage.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 Descriptionapi_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
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
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK