generated from coulomb/repo-seed
first review workflow slice
This commit is contained in:
@@ -361,6 +361,47 @@ class RegistryStore:
|
||||
abilities=abilities,
|
||||
)
|
||||
|
||||
def mark_candidate_graph_status(
|
||||
self,
|
||||
repository_id: int,
|
||||
analysis_run_id: int,
|
||||
status: str,
|
||||
) -> None:
|
||||
with self.connect() as connection:
|
||||
for table in (
|
||||
"candidate_abilities",
|
||||
"candidate_capabilities",
|
||||
"candidate_features",
|
||||
"candidate_evidence",
|
||||
):
|
||||
connection.execute(
|
||||
f"""
|
||||
UPDATE {table}
|
||||
SET status = ?
|
||||
WHERE repository_id = ? AND analysis_run_id = ?
|
||||
""",
|
||||
(status, repository_id, analysis_run_id),
|
||||
)
|
||||
|
||||
def create_review_decision(
|
||||
self,
|
||||
repository_id: int,
|
||||
analysis_run_id: int,
|
||||
*,
|
||||
action: str,
|
||||
notes: str = "",
|
||||
) -> int:
|
||||
with self.connect() as connection:
|
||||
cursor = connection.execute(
|
||||
"""
|
||||
INSERT INTO review_decisions
|
||||
(repository_id, analysis_run_id, action, notes)
|
||||
VALUES (?, ?, ?, ?)
|
||||
""",
|
||||
(repository_id, analysis_run_id, action, notes),
|
||||
)
|
||||
return int(cursor.lastrowid)
|
||||
|
||||
def fail_analysis_run(
|
||||
self,
|
||||
repository_id: int,
|
||||
|
||||
Reference in New Issue
Block a user