Skip to content

Commit

Permalink
chore: add recheck status for blueprints
Browse files Browse the repository at this point in the history
  • Loading branch information
netomi committed Nov 13, 2024
1 parent 8f253b2 commit 9b3e51b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions otterdog/webapp/blueprints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ async def evaluate(self, installation_id: int, github_id: str, recheck: bool = F
blueprint_status_model = await find_blueprint_status(github_id, repo.name, self.id)
if blueprint_status_model is not None and blueprint_status_model.status not in (
BlueprintStatus.NOT_CHECKED,
BlueprintStatus.RECHECK,
BlueprintStatus.FAILURE,
):
continue
Expand Down
1 change: 1 addition & 0 deletions otterdog/webapp/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ class BlueprintStatus(str, Enum):
FAILURE = "failure"
REMEDIATION_PREPARED = "remediation_prepared"
DISMISSED = "dismissed"
RECHECK = "recheck"

def __str__(self) -> str:
return self.name
Expand Down
3 changes: 2 additions & 1 deletion otterdog/webapp/tasks/update_blueprint_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ async def _execute(self) -> None:
blueprint_status.status = BlueprintStatus.REMEDIATION_PREPARED
else:
if self.pull_request.merged is True:
blueprint_status.status = BlueprintStatus.SUCCESS
blueprint_status.status = BlueprintStatus.RECHECK
blueprint_status.remediation_pr = None
elif self.pull_request.merged is False:
blueprint_status.status = BlueprintStatus.DISMISSED
await self._add_comment_to_pr(blueprint_status.id.blueprint_id)
Expand Down

0 comments on commit 9b3e51b

Please sign in to comment.