diff --git a/lib/src/common/repos_service.dart b/lib/src/common/repos_service.dart index 6729f92c..997cb167 100644 --- a/lib/src/common/repos_service.dart +++ b/lib/src/common/repos_service.dart @@ -329,6 +329,7 @@ class RepositoriesService extends Service { return false; } + /// https://docs.github.com/en/rest/collaborators/collaborators#add-a-repository-collaborator Future addCollaborator(RepositorySlug slug, String user) async { ArgumentError.checkNotNull(slug); ArgumentError.checkNotNull(user); @@ -336,9 +337,9 @@ class RepositoriesService extends Service { .request( 'PUT', '/repos/${slug.fullName}/collaborators/$user', - statusCode: StatusCodes.NO_CONTENT, + statusCode: StatusCodes.CREATED, ) - .then((response) => response.statusCode == StatusCodes.NO_CONTENT); + .then((response) => response.statusCode == StatusCodes.CREATED); } Future removeCollaborator(RepositorySlug slug, String user) async {