Skip to content

Add API endpoints for pulls created by, assigned to and requested to review for a user #12461

Closed
@MarkusAmshove

Description

@MarkusAmshove

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

grafik

Metadata

Metadata

Assignees

Labels

modifies/apiThis PR adds API routes or modifies themtype/proposalThe new feature has not been accepted yet but needs to be discussed first.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions