Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
noerw opened this issue Mar 2, 2021 · 1 comment · Fixed by #16168
Closed

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

noerw opened this issue Mar 2, 2021 · 1 comment · Fixed by #16168
Labels
modifies/api This PR adds API routes or modifies them type/enhancement An improvement of existing functionality
Milestone

Comments

@noerw
Copy link
Member

noerw commented Mar 2, 2021

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

@noerw noerw added modifies/api This PR adds API routes or modifies them type/enhancement An improvement of existing functionality labels Mar 2, 2021
@6543 6543 added this to the 1.15.0 milestone Mar 5, 2021
@6543 6543 mentioned this issue Mar 5, 2021
12 tasks
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants