getGithubRepo function
Get the GitHub repo in "owner/repo" format.
Implementation
Future<String?> getGithubRepo({String? cwd}) async {
final remoteUrl = await getRemoteUrl(cwd: cwd);
if (remoteUrl == null) return null;
final parsed = parseGitRemote(remoteUrl);
if (parsed != null && parsed.host == 'github.com') {
return '${parsed.owner}/${parsed.name}';
}
return null;
}