-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DO NOT MERGE: automatching with kcidb-ingest
Signed-off-by: Helen Koike <[email protected]>
- Loading branch information
1 parent
0204582
commit 41b7fd4
Showing
2 changed files
with
429 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from kcidb.tools import kcidb_match | ||
import kcidb | ||
|
||
|
||
def match_test(test): | ||
kcidb_io_object = {"tests": [test._data], | ||
"builds": [test.build._data], | ||
"checkouts": [test.build.checkout._data]} | ||
incident_generator = kcidb_match.IncidentGenerator() | ||
incidents = incident_generator.generate_incidents_from_db(kcidb_io_object) | ||
if (incidents["incidents"]): | ||
kcidb.Client.submit(incidents) | ||
|
||
|
||
def match_build(build): | ||
kcidb_io_object = {"builds": [build._data], | ||
"checkouts": [build.checkout._data]} | ||
incident_generator = kcidb_match.IncidentGenerator() | ||
incidents = incident_generator.generate_incidents_from_db(kcidb_io_object) | ||
if (incidents["incidents"]): | ||
kcidb.Client.submit(incidents) | ||
|
||
|
||
def match_issues(issues): | ||
issue_objects = {"issues": [issues._data]} | ||
incident_generator = kcidb_match.IncidentGenerator() | ||
incident_generator.db.update_patterns(issue_objects) |
Oops, something went wrong.