git-lab-filtermr - Man Page

filter a list of merge-requests (as provided by listmr -j) according to a specified policy filter


git-lab filtermr [-h] -f <filter>


Filter merge requests (as provided by the output of listmr -j) according to specified policy filter.  Output is a json string on stdout that contains a list of Projects and associated MRs that pass/fail the filter tests, along with any other desired anciliary data the filter wishes to provide, suitable for parsing with any json parsing tool.

Output Format

The output format is flexible, containing any data that the filter wishes to provide for the purpose of understanding results.  Required elements in the output json string are:

[ { .project .mriid } ]

Format specifics about a given filter can be obtained by running the filtermr subcommand with the -f and -i options


-h,  --help

Show help message and exit

-f,  ---filter

Specify the policy filter to run

-l,  ---list

List available policy filters

-i,  ---info

Display infomration about the specified filter output


Filter definitions are stored in $HOME/.gitlabporcelain/filters.  Each filter is a python module that implements a function of the type:

def runfilter(repo, lab, inputdata)


repo - is a gitpython repo object

lab - is a python gitlab object

inputdata - is a json decoded object of the format:

{'projectid': [mr iid, mr iid, ....], ...}


git-lab was written by Neil Horman <>.


The latest version of git-lab may be downloaded from


2020/03/12 git-lab 0.5 git-lab Manual