generated from coulomb/repo-seed
candidates can now be edited before approval
This commit is contained in:
@@ -200,6 +200,62 @@ class RegistryService:
|
||||
self.store.update_repository_status(repository_id, "reviewing")
|
||||
return self.store.get_candidate_graph(repository_id, analysis_run_id)
|
||||
|
||||
def edit_candidate_ability(
|
||||
self,
|
||||
repository_id: int,
|
||||
analysis_run_id: int,
|
||||
candidate_ability_id: int,
|
||||
*,
|
||||
name: str,
|
||||
description: str,
|
||||
confidence: float,
|
||||
notes: str = "",
|
||||
) -> CandidateGraph:
|
||||
self.store.update_candidate_ability(
|
||||
repository_id,
|
||||
analysis_run_id,
|
||||
candidate_ability_id,
|
||||
name=name,
|
||||
description=description,
|
||||
confidence=confidence,
|
||||
)
|
||||
self.store.create_review_decision(
|
||||
repository_id,
|
||||
analysis_run_id,
|
||||
action="edit_candidate_ability",
|
||||
notes=notes,
|
||||
)
|
||||
self.store.update_repository_status(repository_id, "reviewing")
|
||||
return self.store.get_candidate_graph(repository_id, analysis_run_id)
|
||||
|
||||
def edit_candidate_capability(
|
||||
self,
|
||||
repository_id: int,
|
||||
analysis_run_id: int,
|
||||
candidate_capability_id: int,
|
||||
*,
|
||||
name: str,
|
||||
description: str,
|
||||
confidence: float,
|
||||
notes: str = "",
|
||||
) -> CandidateGraph:
|
||||
self.store.update_candidate_capability(
|
||||
repository_id,
|
||||
analysis_run_id,
|
||||
candidate_capability_id,
|
||||
name=name,
|
||||
description=description,
|
||||
confidence=confidence,
|
||||
)
|
||||
self.store.create_review_decision(
|
||||
repository_id,
|
||||
analysis_run_id,
|
||||
action="edit_candidate_capability",
|
||||
notes=notes,
|
||||
)
|
||||
self.store.update_repository_status(repository_id, "reviewing")
|
||||
return self.store.get_candidate_graph(repository_id, analysis_run_id)
|
||||
|
||||
def add_ability(
|
||||
self,
|
||||
repository_id: int,
|
||||
|
||||
Reference in New Issue
Block a user