1GIT-LAB-FILTERMR(1) git-lab Manual GIT-LAB-FILTERMR(1)
2
3
4
6 git-lab-filter - filter a list of merge-requests (as provided by listmr
7 -j) according to a specified policy filter
8
9
11 git-lab filtermr [-h] -f <filter>
12
13
15 Filter merge requests (as provided by the output of listmr -j) accord‐
16 ing to specified policy filter. Output is a json string on stdout that
17 contains a list of Projects and associated MRs that pass/fail the fil‐
18 ter tests, along with any other desired anciliary data the filter
19 wishes to provide, suitable for parsing with any json parsing tool.
20
21
23 The output format is flexible, containing any data that the filter
24 wishes to provide for the purpose of understanding results. Required
25 elements in the output json string are:
26
27
28 [ { .project .mriid } ]
29
30
31 Format specifics about a given filter can be obtained by running the
32 filtermr subcommand with the -f and -i options
33
34
36 -h, --help
37 Show help message and exit
38
39
40 -f, ---filter
41 Specify the policy filter to run
42
43
44 -l, ---list
45 List available policy filters
46
47
48 -i, ---info
49 Display infomration about the specified filter output
50
51
53 Filter definitions are stored in $HOME/.gitlabporcelain/filters. Each
54 filter is a python module that implements a function of the type:
55
56 def runfilter(repo, lab, inputdata)
57
58 Where:
59
60 repo - is a gitpython repo object
61
62 lab - is a python gitlab object
63
64 inputdata - is a json decoded object of the format:
65
66 {'projectid': [mr iid, mr iid, ....], ...}
67
68
70 git-lab was written by Neil Horman <nhorman@redhat.com>.
71
72
74 The latest version of git-lab may be downloaded from
75 ⟨https://gitlab.com/nhorman/git-lab-porcelain⟩
76
77
78
79git-lab 0.5 2020/03/12 GIT-LAB-FILTERMR(1)