deleteReference method

Future<bool> deleteReference(
  1. RepositorySlug slug,
  2. String ref
)

Deletes a reference.

API docs: https://developer.github.com/v3/git/refs/#delete-a-reference

Implementation

Future<bool> deleteReference(RepositorySlug slug, String ref) {
  return github
      .request('DELETE', '/repos/${slug.fullName}/git/refs/$ref')
      .then((response) => response.statusCode == StatusCodes.NO_CONTENT);
}