Run the following (maybe you will be asked by pip to enter gitHub credentials)
pip3 install git+https://github.com/vlanse/pymr.git#egg=pymr
Create pymr-config.yaml
like this in your home folder
config:
gitlab: 'https://gitlab.com'
token: "gitlab private token"
team: [dev1_login, dev2_login] # team of interest, see show_only_team option below
robots: [some-robot-account] # automation accounts usernames, to highlight MRs by API clients with special avatar
groups:
project-group-1:
# per-group setting section
show_only_my: true # if only MRs authored by current user are needed for some reason, this overrides show_only_team option
projects:
my_amazing_repo:
id: PROJECT_ID
project-group-2:
projects:
another_repo:
id: PROJECT_ID_2
project-group-3:
show_only_team: true # only team's MRs will be shown
projects:
another_repo:
id: PROJECT_ID_2
If you see error too many open files error
consider either reducing number of repos in config, or use ulimit -n <limit>
command to increase per-process file handlers limit.
Put gitlab address and access token there, write your projects with their IDs
Run:
mr
Possible result:
(in some modern terminal emulators like iTerm MRs captions are clickable links)
Symbols meaning in output:
π - MR has unresolved conflicts
π₯ - pipeline has failed
π¦ - pipeline has succeeded, no problems detected
β³ - waiting for some action
π - MR is too old (> 10d for now)
π - MR was approved by current user (you) at some moment earlier, but approve has been removed for some reason
π€ - MR is created by 'robot', see robots
section in config
To list available options, run:
mr --help
Install virtualenv package (pip3 install virtualenv
).
git clone https://github.com/vlanse/pymr.git && cd pymr
make develop # virtualenv with installed dependencies will be created
mr
script will be installed in virtualenv bin folder