Skip to content

A simple tool which saves your time adding reviewers to the Gitlab Merge Requests

Notifications You must be signed in to change notification settings

EugeneOsadchyi/gitlab-merge-request-creator

Repository files navigation

Gitlab - Create Merge Request

A simple tool which creates a new Merge Request in the GitLab from the current branch.

It sets you, as an 'assignee' and your team as 'reviewers'.

Table of contents

Usage

create-mr --title 'I am a title' --draft true

Available options

  • title - the title of the Merge Request
  • description - the description of the Merge Request (default: Merge Request template, if it is configured)
  • draft - is the Merge Request should be a Draft (default: true)

Prerequisites

Installation

  1. Create a copy of the config.json and fill the gaps

    cp config.example.json config.json

    Example:

    {
      "gitlabBaseURL": "https://gitlab.com/api",
      "personalAccessToken": "1234567890",
      "approvalRuleName": [
        "Team Sunrisers"
      ],
      "targetBranch": "develop"
    }
  2. Install dependencies

    npm install
  3. Compile the project

    npm run build
  4. Add an alias in you .bashrc/.zshrc to the script

    echo "alias create-mr=\"node $(pwd)/build/src/index.js\"" >> ~/.bashrc

    or

    echo "alias create-mr=\"node $(pwd)/build/src/index.js\"" >> ~/.zshrc
  5. Apply the changes to the current terminal session

    source ~/.bashrc

    or

    source ~/.zshrc

About

A simple tool which saves your time adding reviewers to the Gitlab Merge Requests

Topics

Resources

Stars

Watchers

Forks