Skip to content

emberist/mrburns

Repository files navigation

logo

mrburns CLI

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

Compatibile tools

Github repos Gitlab repos
Github issues
Asana
Jira
ClickUp

⚙️ 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 CLICKUP_TOKEN="PUT_YOUR_TOKEN_HERE" # read-only token used to access your click up tasks

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 request 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 to create a mrburns.config.json file

mrburns config

Pass --global to write to your user-level config instead of the project-local one:

mrburns config --global

mrburns reads configuration from two locations, layered in this order (later overrides earlier):

  1. Built-in defaults
  2. User-level config: $XDG_CONFIG_HOME/mrburns/mrburns.config.json, or ~/.config/mrburns/mrburns.config.json if XDG_CONFIG_HOME is unset
  3. Project-local config: ./mrburns.config.json in the current working directory

The merge is deep per key, so a project file only needs to override the fields it cares about; everything else falls through to the user-level file and then the defaults. Use mrburns config --get to inspect the effective merged configuration.

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

About

An amazing CLI tool boosting your speed in repetitive tasks

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors