Get Repo commit url

@param Repo $repo
@param string $commitSHA
@return string
513121
public function getCommitUrl(Repo $repo, $commitSHA)
    {
        return $this->helper->getCommitUrl($repo->getSlug(), $commitSHA);
    }
448855
function getRemoteUrl(repo, remote) {
  return wrapPromise(function (resolve, reject) {
    repo.config(function (err, config) {
      if (err) {
        reject(new Error('Failed to find git repository in ' + config.path))
        return
      }

      resolve(config.items['remote.' + remote + '.url'])
    })
  })
}
557194
def _get_repo_url():
    """"""
    default_repo = 'https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/'
    repo_url = os.environ.get('MXNET_GLUON_REPO', default_repo)
    if repo_url[-1] != '/':
        repo_url = repo_url+'/'
    return repo_url
670832
public function getTree(Environment $environment, $path = '.', $commitSha = null)
    {
        $normalizedSha = $this->normalizeSha($environment, $commitSha);
        $cacheKey = implode(':', ['tree', $environment->project, $path, $normalizedSha]);
        $data = $this->cache->fetch($cacheKey);
        if (!is_array($data)) {
            if (!$commit = $this->getCommit($environment, $normalizedSha)) {
                throw new \InvalidArgumentException(sprintf(
                    'Commit not found: %s',
                    $commitSha
                ));
            }
            if (!$rootTree = $commit->getTree()) {
                // This is unlikely to happen.
                throw new \RuntimeException('Failed to get tree for commit: ' . $commit->id);
            }
            $tree = $rootTree->getTree($path);
            $this->cache->save($cacheKey, [
                'tree' => $tree ? $tree->getData() : null,
                'uri' => $tree ? $tree->getUri() : null,
            ]);
        } elseif (empty($data['tree'])) {
            return false;
        } else {
            $tree = new Tree($data['tree'], $data['uri'], $this->api->getHttpClient(), true);
        }

        return $tree;
    }
886503
public function getFile(Repo $repo)
    {
        $file = tempnam(sys_get_temp_dir(), 'composer');
        $content = file_get_contents($this->helper->getRawFileUrl($repo->getSlug(), 'master', 'composer.json'));
        file_put_contents($file, $content);

        return $file;
    }
928741
public function getStableBadge(Repo $repo)
    {
        if ($repo->getPackagistSlug()) {
            return sprintf('<img src="%s" />', $this->helper->getStableVersionBadgeUrl($repo->getPackagistSlug()));
        }

        return '';
    }
235149
public function show(string $repo, array $params = [])
    {
        $path = $this->buildUsersPath($repo);

        return $this->get($path, $params);
    }
554558
def get_commit(self, sha):
        
        assert isinstance(sha, (str, unicode)), sha
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.url + "/commits/" + sha
        )
        return github.Commit.Commit(self._requester, headers, data, completed=True)
98047
def git_remote(git_repo):
    
    github_token = os.getenv(GITHUB_TOKEN_KEY)
    if github_token:
        return 'https://{0}@github.com/{1}'.format(
            github_token, git_repo)
    return 'git@github.com:{0}'.format(git_repo)
1184833
protected function parse_header_uri( $repo_header ) {
		$header_parts         = parse_url( $repo_header );
		$header_path          = pathinfo( $header_parts['path'] );
		$header['original']   = $repo_header;
		$header['scheme']     = isset( $header_parts['scheme'] ) ? $header_parts['scheme'] : null;
		$header['host']       = isset( $header_parts['host'] ) ? $header_parts['host'] : null;
		$header['owner']      = trim( $header_path['dirname'], '/' );
		$header['repo']       = $header_path['filename'];
		$header['owner_repo'] = implode( '/', [ $header['owner'], $header['repo'] ] );
		$header['base_uri']   = str_replace( $header_parts['path'], '', $repo_header );
		$header['uri']        = isset( $header['scheme'] ) ? trim( $repo_header, '/' ) : null;

		$header = $this->sanitize( $header );

		return $header;
	}
1273889
protected function getRepositoryReference(Adapter $adapter, $org, $repo)
    {
        $remote = $this->findRemoteName(false);
        $repoInfo = $this->gitConfigHelper->getRemoteInfo($remote);

        if (null === $org) {
            $org = $repoInfo['vendor'];
        }

        if (null === $repo) {
            $repo = $repoInfo['repo'];
        }

        $adapterRepoInfo = $adapter->getRepositoryInfo($org, $repo);

        if ($adapterRepoInfo['is_fork']) {
            $org = $adapterRepoInfo['fork_origin']['org'];
            $repo = $adapterRepoInfo['fork_origin']['repo'];
        }

        return [$org, $repo];
    }
359944
protected function getRepositoryApiUrl($owner = null, $repository = null)
    {
        $owner = null !== $owner ? $owner : $this->owner;
        $repository = null !== $repository ? $repository : $this->repository;

        return $this->getApiUrl().'/repos/'.$owner.'/'.$repository;
    }
350857
public function getDailyDownloadBadge(Repo $repo)
    {
        if ($repo->getPackagistSlug()) {
            return sprintf('<img src="%s" />', $this->helper->getDailyDownloadBadgeUrl($repo->getPackagistSlug()));
        }

        return '';
    }
804880
def get_commit_url(repo_url):
    """"""
    if "github.com" in repo_url:
        return repo_url[:-4] if repo_url.endswith(".git") else repo_url
    if "git.openstack.org" in repo_url:
        uri = '/'.join(repo_url.split('/')[-2:])
        return "https://github.com/{0}".format(uri)

    # If it didn't match these conditions, just return it.
    return repo_url
197199
def get_commit(self, commit_id: str) -> Commit:
        
        return Commit(self.repo.commit(commit_id), self.path, self.main_branch)
467740
public function getCombinedStatus($owner, $repo, $ref)
	{
		$data = array();

		return $this->client->request("/repos/$owner/$repo/commits/$ref/status", 'GET', $data, 200, 'GitHubStatus', false);
	}
394530
def get_repo_hexsha(git_folder):
    """"""
    repo = Repo(str(git_folder))
    if repo.bare:
        not_git_hexsha = "notgitrepo"
        _LOGGER.warning("Not a git repo, SHA1 used will be: %s", not_git_hexsha)
        return not_git_hexsha
    hexsha = repo.head.commit.hexsha
    _LOGGER.info("Found REST API repo SHA1: %s", hexsha)
    return hexsha