Get the url API of the repository.

@param string $owner
@param string $repository

@return string
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;
    }
387043
public function fetchRepository(Repository $repository, $withBuild = true)
    {
        $response = $this->getResponse(
            sprintf('/repos/%s',$repository->getSlug()),
            array()
        );
        // Hydrate response into repository
        $project = $this->hydrate($repository, $response);

        if (!$withBuild) {
            return $project;
        }
        // Load Repository builds
        return $this->fetchBuilds($repository);
    }
1031349
function getURL( repository ) {
    var repourl;

    if (typeof repository === 'object') {
        repourl = repository.url;
    } else {
        repourl = repository
    };

    return repourl;
}
1155232
public function update(Repository $repository = null)
    {
        if (!$repository) {
            $repository = $this->getRepository();
        }

        $repository = $repository->aliased('write');

        $update = $this->getQuery()->transformToUpdate();

        $update->setSet($this->setData);

        $prepare = $repository->prepareQuery($update);

        return $repository->executePrepared($prepare);
    }
207579
def get_repository_owner_and_name() -> Tuple[str, str]:
    

    check_repo()
    url = repo.remote('origin').url
    parts = re.search(r'([^/:]+)/([^/]+).git$', url)
    if not parts:
        raise HvcsRepoParseError
    debug('get_repository_owner_and_name', parts)
    return parts.group(1), parts.group(2)
1198054
public String findURIFromDoc(int owner)
  {
    int n = m_sourceTree.size();

    for (int i = 0; i < n; i++)
    {
      SourceTree sTree = (SourceTree) m_sourceTree.elementAt(i);

      if (owner == sTree.m_root)
        return sTree.m_url;
    }

    return null;
  }
406770
public function getBranch($owner, $repo, $branch)
	{
		$data = array();
		
		return $this->client->request("/repos/$owner/$repo/branches/$branch", 'GET', $data, 200, 'GitHubBranch', true);
	}
985687
public function getServiceAuthUrl(Request $request, ResourceOwnerInterface $resourceOwner)
    {
        if ($resourceOwner->getOption('auth_with_one_url')) {
            return $this->httpUtils->generateUri($request, $this->getResourceOwnerCheckPath($resourceOwner->getName()));
        }

        $request->attributes->set('service', $resourceOwner->getName());

        return $this->httpUtils->generateUri($request, 'hwi_oauth_connect_service');
    }
754860
private function getRepositoryUrlWithVersionPath($version)
    {
        $repositoryUrl = $this->repositoryUrl;
        if (in_array($version, array('master', $this->trunkPath))) {
            $repositoryUrl .= '/'.$this->trunkPath;
        } elseif (in_array($version, $this->getBranches())) {
            $repositoryUrl .= '/'.$this->branchesPath.'/'.$version;
        } elseif (in_array($version, $this->getTags())) {
            $repositoryUrl .= '/'.$this->tagsPath.'/'.$version;
        } else {
            return false;
        }

        return ProcessUtils::escapeArgument($repositoryUrl);
    }
1105248
public function getCurrent(
        Result $result,
        bool $addQuersyStringPlaceholder = false
    ): ? string {
        $urlParameters = $this->generateQueryUrlParameters($result);
        if ($addQuersyStringPlaceholder) {
            $urlParameters['q'] = '{{q}}';
        }

        return $this->createUrlByUrlParameters(
            $result,
            $urlParameters
        )['route'];
    }
1111081
public function findOne(Repository $repository = null): Model
    {
        if (!$repository && !($repository = $this->repository)) {
            throw new \RuntimeException('The current Query object is not tied to any Repository');
        }

        return $repository->findOne($this->compileParameters());
    }
633215
public function index(RouteRepositoryInterface $repository)
    {
        $data = $repository->get(
            config('api-tester.include'),
            config('api-tester.exclude')
        );

        return response()->json(compact('data'));
    }
921167
public function getTheReadme($owner, $repo, $ref = null)
	{
		$data = array();
		if(!is_null($ref))
			$data['ref'] = $ref;
		
		return $this->client->request("/repos/$owner/$repo/readme", 'GET', $data, 200, 'GitHubRepoContent');
	}
525082
protected function getRepositoryReleases()
    {
        if (empty($this->config['repository_vendor']) || empty($this->config['repository_name'])) {
            throw new \Exception('No repository specified. Please enter a valid Github repository owner and name in your config.');
        }

        return $this->client->request(
            'GET',
            self::GITHUB_API_URL.'/repos/'.$this->config['repository_vendor'].'/'.$this->config['repository_name'].'/tags'
        );
    }
1056222
private function getSettingsFromRepository(SettingsOwnerInterface $owner = null)
    {
        $settings = array();

        foreach (array_keys($this->settingsConfiguration) as $name) {
            try {
                $this->validateSetting($name, $owner);
                $settings[$name] = null;
            } catch (WrongScopeException $e) {
                continue;
            }
        }

        /** @var Setting $setting */
        foreach ($this->repository->findBy(
            array('ownerId' => $owner === null ? null : $owner->getSettingIdentifier())
        ) as $setting) {
            if (array_key_exists($setting->getName(), $settings)) {
                $settings[$setting->getName()] = $this->serializer->unserialize($setting->getValue());
            }
        }

        return $settings;
    }
430028
public function urlForReference(string $user, string $repo, string $ref): string
    {
        $key = sprintf(self::CACHE_KEY_TEMPLATE, md5($user . $repo), 'ref_url_' . md5($ref));

        if (($latest = $this->getFromCache($key)) !== null) {
            return $latest;
        }

        [$type, $resolved] = $this->resolveRefType($ref);
        $repoURL = $this->urlForRepository($user, $repo);

        switch ($type) {
            case 'commit':
                $url = "${repoURL}/commit/${resolved}";
                break;

            case 'tag':
                $url = "${repoURL}/releases/tag/${resolved}";
                break;

            case 'pull':
                $url = "${repoURL}/pull/${resolved}";
                break;

            case 'branch':
            default:
                $url = "${repoURL}/tree/${resolved}";
        }

        $this->setToCache($key, $url, 30);
        return $url;
    }
522809
public function fetchBuilds(Repository $repository)
    {
        $response = $this->getResponse(
            sprintf('/repos/%s/builds',$repository->getSlug()),
            array());

        if (is_array($response)) {
            // Load project builds
            foreach ($response as $buildData) {
                $build = new Build();
                // Add build to repository instance
                $repository->addBuild($this->hydrate($build, $buildData));
            }
        }

        return $repository;
    }