Skip to content

[FR] add API to get available reviewers & assignees #14856

Closed
@noerw

Description

@noerw

expose repo.GetReviewers() as GET /api/v1/repos/<owner>/<repo>/reviewers
expose repo.GetAssignees() as GET /api/v1/repos/<owner>/<repo>/assignees

gitea/models/repo.go

Lines 617 to 624 in a4148c0

// GetReviewers get all users can be requested to review:
// * for private repositories this returns all users that have read access or higher to the repository.
// * for public repositories this returns all users that have read access or higher to the repository,
// all repo watchers and all organization members.
// TODO: may be we should have a busy choice for users to block review request to them.
func (repo *Repository) GetReviewers(doerID, posterID int64) ([]*User, error) {
return repo.getReviewers(x, doerID, posterID)
}

This would be helpful for tea issue create

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtype/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions