Add GET /api/v1/commitfests endpoint listing all commitfests - #114
Merged
Conversation
kjrocker
force-pushed
the
api-commitfests-index
branch
3 times, most recently
from
September 1, 2026 20:49
b49d1d9 to
d894953
Compare
Commitfests marked as draft are otherwise indistinguishable from regular ones in the API output, since they share the Open status.
There is currently no way to discover which commitfests exist. The needs_ci endpoint only returns the two or three currently relevant ones, and the patches endpoint requires a commitfest id you already know. API consumers are left enumerating ids until they get a 404, or scraping the HTML pages that already show this data. This returns every commitfest, closed and draft ones included, ordered by id. It deliberately does not use CommitFest.relevant_commitfests(), which has write side effects and can return unsaved objects.
kjrocker
force-pushed
the
api-commitfests-index
branch
from
September 1, 2026 20:58
d894953 to
ed8ca0e
Compare
JelteF
approved these changes
Sep 1, 2026
Collaborator
|
Linter/formatting check is failing. Other than that this seems like a good addition. |
Contributor
Author
|
The linter/formatting failures are throughout the repo, it seems like ruff pulled in a new version with different defaults. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's no way to discover which commitfests exist.
needs_cireturns only the two or three currently relevant ones, and/api/v1/commitfests/<cfid>/patchesrequires a cfid.This adds
GET /api/v1/commitfestswhich returns every commitfest, closed and draft ones included:{"commitfests": [{"id": 1, "name": "PG18-3", "status": "Closed", "draft": false, "startdate": "2024-11-01", "enddate": "2024-11-30"}, ...]}This data is all already available from
/commitfest_historyand/archive, but those would need to be scraped, this makes the data machine-readable.Notes:
CommitFest.to_json(). This does add the key toneeds_ci. If we'd rather be strict about that endpoint, I can build the dict inline in a new view instead.