getGithubRepoOwner function

String getGithubRepoOwner(
  1. String repoUrl
)

Get the github repository owner name from repoUrl.

Implementation

String getGithubRepoOwner(final String repoUrl) {
  final List<String> paths = Uri.parse(repoUrl).pathSegments;
  return paths[paths.length - 2];
}