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


##########
atr/models/api.py:
##########
@@ -377,11 +381,78 @@ def validate_policy_fields(self) -> "PolicyUpdateArgs":
         return self
 
 
+class PolicyUpdateArgs(PolicyArgsBase):
+    project: safe.ProjectKey = schema.example("example")
+
+
 class PolicyUpdateResults(schema.Strict):
     endpoint: Literal["/policy/update"] = schema.alias("endpoint")
     success: Literal[True] = schema.example(True)
 
 
+class ProjectConfigProjectArgs(schema.Strict):
+    name: str | None = None
+    description: str | None = None
+    short_description: str | None = None
+    homepage: str | None = None
+    lifecycle_page: str | None = None
+    download_page: str | None = None
+    bug_database: str | None = None
+    mailing_lists: str | None = None
+    repository: list[str] | None = None
+    standards: list[str] | None = None
+    # Changing any of these four reassigns existing releases to the cycle
+    # their version string now maps to.
+    version_method: sql.VersionMethod | None = None
+    version_pattern: str | None = None
+    cycle_match: str | None = None
+    branch_template: str | None = None
+
+    @pydantic.field_validator("version_method", mode="before")
+    @classmethod
+    def version_method_to_enum(cls, v):
+        if isinstance(v, str):
+            try:
+                return sql.VersionMethod.__members__[v]

Review Comment:
   Actually I'll raise that separately as it will need a change to the 
automation builds and that's not as high priority



-- 
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