Skip to content

Latest commit

 

History

History
159 lines (108 loc) · 3.44 KB

README.md

File metadata and controls

159 lines (108 loc) · 3.44 KB

logo

mrburns CLI

mrburns allows you to effortlessly create task-specific branches and merge requests in just seconds!

Compatibile tools

Github repos Gitlab repos Bitbucket repos
Github issues 🚧 WIP
Asana 🚧 WIP
Jira 🚧 WIP

⚙️ Setup

Installation

First, install rustup and cargo, here the docs

then run this command

cargo install mrburns --git https://github.com/emberist/mrburns

or, clone this repo and add the required permission to the install.sh script

chmod a+x ./install.sh

Then run the install.sh script:

./install.sh

Supported tools

Set the environment variables

Based on which tool you are using, you have to add the following environment variables in your ~/.zshrc file (or ~/.bashrc if you use Bash).

export JIRA_USERNAME="PUT_YOUR_USERNAME_HERE"
export JIRA_TOKEN="PUT_YOUR_TOKEN_HERE"

export GITHUB_TOKEN="PUT_YOUR_TOKEN_HERE" # read-only token used to access your github issues

After that, do not forget to run source ~/.zshrc (or source ~/.bashrc if you use Bash). 🤓

Here are some hints on how to generate the tokens.

🚀 Run

Help

This command prints mrburns's help screen, which lists all the available commands and options.

mrburns --help

Start a task

This commands switches to a new Git branch to start working on it. mrburns takes care of creating a proper name for the branch starting from the task title.

mrburns start https://your-domain.atlassian.net/browse/foo-3293

NOTE: There is an options --type option (or -t) to choose the task type between bugfix, chore or feature

Create a Merge Request

This commands open for you a prefilled marge reuest page

mrburns mr

List

Helpful when you need to quickly switch between active mrburns's branches;

mrburns list

Browse

Helpful when you need to quickly open you task from the codebase current branch!

mrburns browse

Set your config file

This command helps you creating a mrburns.config.json file

mrburns config

The default config file is something like this

{
  "mr": {
    "defaultDraft": false,
    "titleTemplate": "{task_id}/{task_type}/{task_title}",
    "descriptionTemplate": [],
    "descriptionTemplatePath": "./templates/default.md"
  },
  "branchPrefixes": {
    "feature": "feat",
    "release": "release",
    "bugfix": "bugfix",
    "chore": "chore"
  }
}

if the descriptionTemplatePath file exists, it will override the descriptionTemplate option

🧑‍💻 Develop

Run

cargo run -- <...commands>

Compile

cargo build

Test

cargo test