stable

Clone or download

Read-only

feat: filter repository pull-requests on author

part of story #35821 Pull request new home page - Filter on Authors This contribution allows users to filter the pull-requests inside a given repository on a given author. How to test: - Using the API explorer, retrieve the pull-requests of a repository with `GET /git/:id/pull_requests` without specifying any query. --> All the pull-requests are returned (open and closed) - Use `{"author": {"id": user_id}}` where user id is the id of a pull-request author. --> All the pull-requests created by this user are returned - Use `{"author": {"id": user_id}, "status": "open"}` as the query parameter. --> All the pull-requests created by this user that are still open are returned. Change-Id: I2b39cb0ef0613c617fb9773ce022b830236a9d94

Modified Files

Name
M plugins/git/include/REST/v1/RepositoryResource.class.php +15 −3 Go to diff View file
R plugins/pullrequest/include/PullRequest/Criterion/MalformedStatusQueryParameterFault.php Go to diff View file
M plugins/pullrequest/include/PullRequest/Criterion/MalformedQueryFault.php +11 −0 Go to diff View file
M plugins/pullrequest/include/PullRequest/Criterion/SearchCriteria.php +10 −2 Go to diff View file
M plugins/pullrequest/include/PullRequest/Criterion/StatusCriterion.php +0 −2 Go to diff View file
M plugins/pullrequest/include/PullRequest/Dao.php +5 −0 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/FaultMapper.php +1 −2 Go to diff View file
M plugins/pullrequest/include/PullRequest/REST/v1/RepositoryPullRequests/QueryToSearchCriteriaConverter.php +3 −12 Go to diff View file
M plugins/pullrequest/tests/integration/DaoTest.php +46 −3 Go to diff View file
M plugins/pullrequest/tests/unit/REST/v1/RepositoryPullRequests/QueryToSearchCriteriaConverterTest.php +58 −5 Go to diff View file