Description
Hi,
I wanted to create a tool to have a better overview of my pull requests (created), the ones I'm assigned to and the ones I've been requested to do a review.
I wanted to add the endpoints myself, but before doing any work, they should be designed and agreed upon :-)
Suggestion
I've chosen /api/.../pulls
for this proposal, because this path is is the same the UI uses (e.g. https://gitea.com/pulls when logged in).
GET /api/v1/pulls
: returns all pull requests from all repositories the authenticated user can see (same as with the UI).
GET /api/v1/pulls/created
: returns all pull requests from all repositories the authenticated user has created
GET /api/v1/pulls/assigned
: returns all pull requests from all repositories the authenticated user was assigned to
GET /api/v1/pulls/reviewee
: returns all pull requests from all repositories the authenticated user was requested to do a review
If they're implemented, the filters in the UI could reuse them and also add a new filter (reviewee):