From e5e92d2c1d16ab4912522392e84d1e16a2f353ab Mon Sep 17 00:00:00 2001 From: Kenneth Endfinger Date: Sat, 30 Aug 2014 14:47:06 -0400 Subject: [PATCH] Listing/Checking of Available Issue Assignees --- lib/src/common/github.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/src/common/github.dart b/lib/src/common/github.dart index 6214e4c1..567f0989 100644 --- a/lib/src/common/github.dart +++ b/lib/src/common/github.dart @@ -188,6 +188,14 @@ class GitHub { Future deleteLabel(RepositorySlug slug, String name) { return request("DELETE", "/repos/${slug.fullName}/labels/${name}").then((response) => response.statusCode == StatusCodes.NO_CONTENT); } + + Stream availableAssignees(RepositorySlug slug) { + return new PaginationHelper(this).objects("GET", "/repos/${slug.fullName}/assignees", User.fromJSON); + } + + Future isAvailableAssignee(RepositorySlug slug, String name) { + return request("GET", "/repos/${slug.fullName}/assignees/${name}").then((response) => response.statusCode == StatusCodes.NO_CONTENT); + } /** * Fetches the teams for the specified organization.