alitheg commented on code in PR #1186:
URL: 
https://github.com/apache/tooling-trusted-releases/pull/1186#discussion_r3186902097


##########
atr/storage/writers/project.py:
##########
@@ -186,17 +188,59 @@ async def create(self, committee_key: safe.CommitteeKey, 
display_name: str, labe
             else:
                 raise
 
+    async def archive(self, project_key: safe.ProjectKey) -> None:
+        project = await self.__data.project(key=str(project_key), 
status=sql.ProjectStatus.ACTIVE, _releases=True).get()
+
+        if not project:
+            raise storage.AccessError(f"Project '{project_key}' not found.")
+
+        # TODO: once release archival is implemented, relax this further
+        post_draft_phases = {
+            sql.ReleasePhase.RELEASE_CANDIDATE,
+            sql.ReleasePhase.RELEASE_PREVIEW,
+            sql.ReleasePhase.RELEASE,
+        }
+        if any(r.phase in post_draft_phases for r in project.releases):

Review Comment:
   The original idea I think was that draft releases would be discarded if a 
project is archived (archived == retired). 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to