File tree Expand file tree Collapse file tree 2 files changed +429
-0
lines changed Expand file tree Collapse file tree 2 files changed +429
-0
lines changed Original file line number Diff line number Diff line change
1
+ from kcidb .tools import kcidb_match
2
+ import kcidb
3
+
4
+
5
+ def match_test (test ):
6
+ kcidb_io_object = {"tests" : [test ._data ],
7
+ "builds" : [test .build ._data ],
8
+ "checkouts" : [test .build .checkout ._data ]}
9
+ incident_generator = kcidb_match .IncidentGenerator ()
10
+ incidents = incident_generator .generate_incidents_from_db (kcidb_io_object )
11
+ if (incidents ["incidents" ]):
12
+ kcidb .Client .submit (incidents )
13
+
14
+
15
+ def match_build (build ):
16
+ kcidb_io_object = {"builds" : [build ._data ],
17
+ "checkouts" : [build .checkout ._data ]}
18
+ incident_generator = kcidb_match .IncidentGenerator ()
19
+ incidents = incident_generator .generate_incidents_from_db (kcidb_io_object )
20
+ if (incidents ["incidents" ]):
21
+ kcidb .Client .submit (incidents )
22
+
23
+
24
+ def match_issues (issues ):
25
+ issue_objects = {"issues" : [issues ._data ]}
26
+ incident_generator = kcidb_match .IncidentGenerator ()
27
+ incident_generator .db .update_patterns (issue_objects )
You can’t perform that action at this time.
0 commit comments