All Projects → vishwanatharondekar → Gitlab Cli

vishwanatharondekar / Gitlab Cli

Licence: mit
Create a merge request from command line in gitlab

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Gitlab Cli

Starcli
✨ Browse GitHub trending projects from your command line
Stars: ✭ 269 (+20.09%)
Mutual labels:  command-line-tool, commandline, cli, command-line
Brotab
Control your browser's tabs from the command line
Stars: ✭ 137 (-38.84%)
Mutual labels:  command-line-tool, commandline, cli, command-line
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (+54.02%)
Mutual labels:  command-line-tool, commandline, cli, command-line
You Dont Need Gui
Stop relying on GUI; CLI **ROCKS**
Stars: ✭ 4,766 (+2027.68%)
Mutual labels:  command-line-tool, commandline, cli, command-line
Git Repo
Git-Repo: CLI utility to manage git services from your workspace
Stars: ✭ 818 (+265.18%)
Mutual labels:  utility, cli-utilities, cli, gitlab
Dry Cli
General purpose Command Line Interface (CLI) framework for Ruby
Stars: ✭ 210 (-6.25%)
Mutual labels:  command-line-tool, cli-utilities, cli, command-line
Klog
A plain-text file format and command line tool for time tracking
Stars: ✭ 222 (-0.89%)
Mutual labels:  command-line-tool, cli, command-line
Csv2db
The CSV to database command line loader
Stars: ✭ 102 (-54.46%)
Mutual labels:  command-line-tool, cli, command-line
Awesome Cli
A curated list of awesome resources for building immersive CLI experiences.
Stars: ✭ 104 (-53.57%)
Mutual labels:  command-line-tool, cli, command-line
Dynein
DynamoDB CLI written in Rust.
Stars: ✭ 126 (-43.75%)
Mutual labels:  command-line-tool, cli, command-line
Lc
licensechecker (lc) a command line application which scans directories and identifies what software license things are under producing reports as either SPDX, CSV, JSON, XLSX or CLI Tabular output. Dual-licensed under MIT or the UNLICENSE.
Stars: ✭ 93 (-58.48%)
Mutual labels:  command-line-tool, commandline, cli
Httpcat
httpcat is a simple utility for constructing raw HTTP requests on the command line.
Stars: ✭ 109 (-51.34%)
Mutual labels:  utility, cli, command-line
Zoxide
A smarter cd command. Supports all major shells.
Stars: ✭ 4,422 (+1874.11%)
Mutual labels:  command-line-tool, cli, command-line
Ask Cli
Alexa Skills Kit Command Line Interface
Stars: ✭ 100 (-55.36%)
Mutual labels:  command-line-tool, cli, command-line
Tooling
Advancing Node.js as a framework for writing great tools
Stars: ✭ 98 (-56.25%)
Mutual labels:  command-line-tool, cli, command-line
Miniserve
🌟 For when you really just want to serve some files over HTTP right now!
Stars: ✭ 2,894 (+1191.96%)
Mutual labels:  command-line-tool, cli, command-line
Terminal layout
The project help you to quickly build layouts in terminal,cross-platform(一个跨平台的命令行ui布局工具)
Stars: ✭ 98 (-56.25%)
Mutual labels:  command-line-tool, cli, command-line
Git Chglog
CHANGELOG generator implemented in Go (Golang).
Stars: ✭ 1,895 (+745.98%)
Mutual labels:  command-line-tool, cli, gitlab
Asciigraph
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
Stars: ✭ 1,805 (+705.8%)
Mutual labels:  utility, command-line, command-line-tool
Pypistats
Command-line interface to PyPI Stats API to get download stats for Python packages
Stars: ✭ 86 (-61.61%)
Mutual labels:  command-line-tool, cli, command-line

gitlab-cli

gitlab-cli is a command line utility created in JavaScript. Inspired from hub. It tries to provide commands which makes working with gitlab from the command line easier.

Creating a merge request with gitlab-cli is as simple as

$ lab merge-request

Installation

Install it using npm

$ npm install git-lab-cli -g

Usage

$ lab command [options]

To get a list of available commands

$ lab --help

Commands available

browse [options]          Open current branch or a specific page in gitlab
compare [options]         Open compare page between two branches
merge-request [options]   Create merge request on gitlab
merge-requests [options]  Opens merge request page for the repo.

Check help of each command like following

$ lab merge-request --help

Running example

$ lab merge-request -b feature/feature-name -t develop

Above will create merge request for merging feature/feature-name in develop.

Options for create-merge-request

-b, --base [optional]                  Base branch name
-t, --target [optional]                Target branch name
-m, --message [optional]               Title of the merge request
-a, --assignee [optional]              User to assign merge request to
-l, --labels [optional]                Comma separated list of labels to assign while creating merge request
-r, --remove_source_branch [optional]  Flag indicating if a merge request should remove the source branch when merging
-s, --squash [optional]                Squash commits into a single commit when merging
-e, --edit [optional]                  If supplied opens edit page of merge request. Prints the merge request URL otherwise
-o, --open [optional]                  If supplied open the page of the merge request. Prints the merge request URL otherwise
-p, --print [deprecated]               Doesn't do anything. Kept here for backward compatibility. Default is print.
-v, --verbose [optional]               Detailed logging emitted on console for debug purpose
-h, --help                             output usage information

Configurations

gitlab-cli captures configurations needed for itself on the first run. Just run the command you want to run and it will capture the information needed.

You can also set the configurations yourself as git config (project specific) or environment variables (global).

git config

Setting git config allows you to provide separate configurations for each gitlab repository.

$ git config --add gitlab.url "https://gitlab.yourcompany.com"
$ git config --add gitlab.token "abcdefghijskl-1230"

Find your gitlab token at https://gitlab.yourcompany.com/profile/account

Environment variables

Setting environment variables allows you to provide global configurations which will be used for all your gitlab repositories when using gitlab-cli.

GITLAB_URL=https://gitlab.yourcompany.com
GITLAB_TOKEN=abcdefghijskl-1230

Find your gitlab token at https://gitlab.yourcompany.com/profile/account

Features supported

  1. Base branch is optional. If base branch is not provided. Current branch is used as base branch.
  2. Target branch is optional. If target branch is not provided, default branch of the repo in gitlab will be used.
  3. Created merge request page will be opened automatically after successful creation.
  4. If title is not supported with -m option value. It will be taken from in place editor opened. First line is taken as title.
  5. In place editor opened contains latest commit message.
  6. In the editor opened third line onwards takes as description.
  7. Comma separated list of labels can be provided with its option.
  8. Supports forks. If base branch and target branch are on different remotes. Merge request will be created between forks.
  9. Supports setting assignee for merge request.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].