Skip to content

Latest commit

 

History

History
92 lines (59 loc) · 2.11 KB

tutorial.md

File metadata and controls

92 lines (59 loc) · 2.11 KB

Tutorial: review your first merge request

In this tutorial you install mrq, connect it to GitLab, and open a merge request from your terminal. It takes about five minutes.

You need a GitLab account, mise or a Rust toolchain, and a terminal with a Unicode font.

1. Install mrq

With mise:

mise use -g packslip:github.com/flou/mrq

Or build from source, from a clone of the repository:

cargo install --path .

Check that it worked:

mrq --version

2. Create a token

In GitLab, go to Preferences → Access tokens and create a personal access token with the read_api scope. Copy it.

3. Create the config file

mrq init-config

This writes a commented config to ~/.config/mrq/config.toml. Every line in it is commented out, so it behaves as if it did not exist. Open it and set your GitLab URL:

[gitlab]
url = "https://gitlab.example.com"

Leave url out if you use gitlab.com.

4. Provide the token

For this tutorial, export it in your shell:

export MRQ_TOKEN="glpat-..."

How to keep the token out of your shell shows better options for daily use.

5. Check the setup

mrq check

mrq validates the config, verifies the token and connects to GitLab. Fix any error it prints before you continue.

6. Start mrq

mrq

You see one tab, Assigned, listing the open merge requests assigned to you. Rows from a previous run appear immediately, and mrq refreshes them in the background.

7. Move around

Key What happens
j / k move down / up
d show the details of the selected merge request
Shift-C show its comments
Esc close a popup
w show extra columns
? list every key

8. Open a merge request

Press o or Enter to open the selected merge request in your browser. Press y to copy its URL instead.

Press q to quit.

Next steps