This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new 0749058 Add more committee API endpoints
0749058 is described below
commit 074905845cc5d84d1487ce08bbce0f2d2c768997
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Jul 2 19:21:37 2025 +0100
Add more committee API endpoints
---
atr/blueprints/api/api.py | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/atr/blueprints/api/api.py b/atr/blueprints/api/api.py
index 6379984..ca2bf58 100644
--- a/atr/blueprints/api/api.py
+++ b/atr/blueprints/api/api.py
@@ -58,6 +58,33 @@ async def committees() -> tuple[list[Mapping], int]:
return [committee.model_dump() for committee in committees], 200
[email protected]("/committees/<name>")
+@quart_schema.validate_response(models.Committee, 200)
+async def committees_name(name: str) -> tuple[Mapping, int]:
+ """Get a specific committee by name."""
+ async with db.session() as data:
+ committee = await
data.committee(name=name).demand(exceptions.NotFound())
+ return committee.model_dump(), 200
+
+
[email protected]("/committees/<name>/keys")
+@quart_schema.validate_response(list[models.PublicSigningKey], 200)
+async def committees_name_keys(name: str) -> tuple[list[Mapping], int]:
+ """List all public signing keys associated with a specific committee."""
+ async with db.session() as data:
+ committee = await data.committee(name=name,
_public_signing_keys=True).demand(exceptions.NotFound())
+ return [key.model_dump() for key in committee.public_signing_keys], 200
+
+
[email protected]("/committees/<name>/projects")
+@quart_schema.validate_response(list[models.Project], 200)
+async def committees_name_projects(name: str) -> tuple[list[Mapping], int]:
+ """List all projects for a specific committee."""
+ async with db.session() as data:
+ committee = await data.committee(name=name,
_projects=True).demand(exceptions.NotFound())
+ return [project.model_dump() for project in committee.projects], 200
+
+
@api.BLUEPRINT.route("/keys")
@quart_schema.validate_querystring(Pagination)
async def public_keys(query_args: Pagination) -> quart.Response:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]