mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 17:56:17 +01:00
added option for branches to getChangesets method of rest api
This commit is contained in:
@@ -658,6 +658,7 @@ public class RepositoryResource
|
|||||||
* @param id the id of the repository
|
* @param id the id of the repository
|
||||||
* @param path path of a file
|
* @param path path of a file
|
||||||
* @param revision the revision of the file specified by the path parameter
|
* @param revision the revision of the file specified by the path parameter
|
||||||
|
* @param branch
|
||||||
* @param start the start value for paging
|
* @param start the start value for paging
|
||||||
* @param limit the limit value for paging
|
* @param limit the limit value for paging
|
||||||
*
|
*
|
||||||
@@ -670,11 +671,16 @@ public class RepositoryResource
|
|||||||
@Path("{id}/changesets")
|
@Path("{id}/changesets")
|
||||||
@TypeHint(ChangesetPagingResult.class)
|
@TypeHint(ChangesetPagingResult.class)
|
||||||
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
|
||||||
public Response getChangesets(@PathParam("id") String id,
|
//J-
|
||||||
@QueryParam("path") String path, @QueryParam("revision") String revision,
|
public Response getChangesets(
|
||||||
@DefaultValue("0")
|
@PathParam("id") String id,
|
||||||
@QueryParam("start") int start, @DefaultValue("20")
|
@QueryParam("path") String path,
|
||||||
@QueryParam("limit") int limit) throws RepositoryException, IOException
|
@QueryParam("revision") String revision,
|
||||||
|
@QueryParam("branch") String branch,
|
||||||
|
@DefaultValue("0") @QueryParam("start") int start,
|
||||||
|
@DefaultValue("20") @QueryParam("limit") int limit
|
||||||
|
) throws RepositoryException, IOException
|
||||||
|
//J+
|
||||||
{
|
{
|
||||||
Response response = null;
|
Response response = null;
|
||||||
RepositoryService service = null;
|
RepositoryService service = null;
|
||||||
@@ -697,6 +703,11 @@ public class RepositoryResource
|
|||||||
builder.setStartChangeset(revision);
|
builder.setStartChangeset(revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Strings.isNullOrEmpty(branch))
|
||||||
|
{
|
||||||
|
builder.setBranch(branch);
|
||||||
|
}
|
||||||
|
|
||||||
changesets =
|
changesets =
|
||||||
builder.setPagingStart(start).setPagingLimit(limit).getChangesets();
|
builder.setPagingStart(start).setPagingLimit(limit).getChangesets();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user