Star a repository.
@param {string} owner
@param {string} repo
546692
async function del(owner, repo) {
  const endpoint = `/user/starred/${owner}/${repo}`
  const { statusCode } = await this._request({
    method: 'PUT',
    data: {},
    endpoint,
  })
  if (statusCode != 204) {
    throw new Error(`Unexpected status code ${statusCode}.`)
  }
}
147946
def unstar(self, login, repo):
        
        resp = False
        if login and repo:
            url = self._build_url('user', 'starred', login, repo)
            resp = self._boolean(self._delete(url), 204, 404)
        return resp
1168742
def owner_active?(feature, owner)
      redis.sismember(owner_key(feature, owner), owner.id)
    end
985775
private void addOwner(UNode ownerNode) {
        String ownerName = ownerNode.getName();
        SortedMap<String, RESTCommand> ownerMap = new TreeMap<>();
        m_cmdsByOwnerMap.put(ownerName, ownerMap);
        for (UNode cmdNode : ownerNode.getMemberList()) {
            RESTCommand cmd = RESTCommand.fromUNode(cmdNode);
            ownerMap.put(cmd.getName(), cmd);
        }
    }
1218846
def initrepo(repopath, bare, shared):
    

    ag = activegit.ActiveGit(repopath, bare=bare, shared=shared)
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');
	}
497889
function cloneRepo(item){

      var deferred = Q.defer();
      var repoURL = item.repo;
      var path = item.path;

      deleteOldFiles(path).
      then(function(){
        return performCmd(repoURL, path);
      }).then(function(success){
        return npmInstall(path, success);
      }).then(function(success){
        return bowerInstall(path, success);
      }).then(function(){
        deferred.resolve();
      });

      return deferred.promise;

    }
213487
function cloneRepo (repo) {
    start(`Cloning ${repo.cyan} from Github...`);
    exec(`rm -rf ${repo}`);
    exec(`git clone git@github.com:angular/${repo}.git --depth=1`);
    done();
    cleanupCmds.push(`rm -rf ${repo}`);
  }
270504
def validate_owner_repo_distro(ctx, param, value):
    """"""
    # pylint: disable=unused-argument
    form = "OWNER/REPO/DISTRO[/RELEASE]"
    return validate_slashes(param, value, minimum=3, maximum=4, form=form)
826887
def target_repo(upstream=false)
      # TODO: Manually override this and set arbitrary repositories
      if upstream
        server.repository(source_repo).parent.full_name
      else
        source_repo
      end
    end
406102
def _set_repo(self, url):
        """"""
        if url.startswith('http'):
            try:
                self.repo = Proxy(url)
            except ProxyError, e:
                log.exception('Error setting repo: %s' % url)
                raise GritError(e)
        else:
            try:
                self.repo = Local(url)
            except NotGitRepository:
                raise GritError('Invalid url: %s' % url)
            except Exception, e:
                log.exception('Error setting repo: %s' % url)
                raise GritError(e)
1215945
def repository(self, owner, repository):
        
        json = None
        if owner and repository:
            url = self._build_url('repos', owner, repository)
            json = self._json(self._get(url), 200)
        return Repository(json, self) if json else None
544752
function get (repo, cb) {
    try {
      Gitters.fetch(repo.username + '/' + repo.repo, function(data){
        cb.call(null, repo, data)
      }, /* bubble error */ true)
    } catch(err) {
      log(err.message)
    }
  }
1348562
def install_repo(self, repo, location=''):
        

        dst = location or settings.upkg_destdir

        # make sure the destination dir exists.
        if not os.path.exists(dst):
            os.makedirs(dst)

        # repo = Repo(url=repo, repo_dir=dst)
        repo = Repo(url=repo)
        repo.install()

        return repo
499808
func (o *Object) Owner() *Repository {
	ret := &Repository{
		ptr: C.git_object_owner(o.ptr),
	}
	runtime.KeepAlive(o)
	return ret
}
1057567
function Git(repo, initialBranch) {
  this._repo = repo
  this._staged = []
  this._localBranches = []
  this._remoteBranches = []
  this._currentBranch = initialBranch
  this._commits = []
}
169305
async function initRepo({
  repository,
  endpoint,
  gitPrivateKey,
  gitFs,
  localDir,
}) {
  logger.debug(
    `initRepo("${JSON.stringify(
      { repository, endpoint, gitFs, localDir },
      null,
      2
    )}")`
  );
  const opts = hostRules.find({ platform }, { endpoint });
  // istanbul ignore if
  if (!(opts.username && opts.password)) {
    throw new Error(
      `No username/password found for Bitbucket repository ${repository}`
    );
  }
  // istanbul ignore if
  if (!opts.endpoint) {
    throw new Error(`No endpoint found for Bitbucket Server`);
  }
  hostRules.update({ ...opts, platform, default: true });
  api.reset();

  const [projectKey, repositorySlug] = repository.split('/');
  config = { projectKey, repositorySlug, gitPrivateKey };

  // Always gitFs
  const { host, pathname } = url.parse(opts.endpoint);
  const gitUrl = GitStorage.getUrl({
    gitFs: gitFs || 'https',
    auth: `${opts.username}:${opts.password}`,
    host: `${host}${pathname}${pathname.endsWith('/') ? '' : '/'}scm`,
    repository,
  });

  config.storage = new GitStorage();
  await config.storage.initRepo({
    ...config,
    localDir,
    url: gitUrl,
  });

  const platformConfig = {};

  try {
    const info = (await api.get(
      `./rest/api/1.0/projects/${config.projectKey}/repos/${
        config.repositorySlug
      }`
    )).body;
    platformConfig.privateRepo = info.is_private;
    platformConfig.isFork = !!info.parent;
    platformConfig.repoFullName = info.name;
    config.owner = info.project.key;
    logger.debug(`${repository} owner = ${config.owner}`);
    config.defaultBranch = (await api.get(
      `./rest/api/1.0/projects/${config.projectKey}/repos/${
        config.repositorySlug
      }/branches/default`
    )).body.displayId;
    config.baseBranch = config.defaultBranch;
    config.mergeMethod = 'merge';
  } catch (err) /* istanbul ignore next */ {
    logger.debug(err);
    if (err.statusCode === 404) {
      throw new Error('not-found');
    }
    logger.info({ err }, 'Unknown Bitbucket initRepo error');
    throw err;
  }
  delete config.prList;
  delete config.fileList;
  logger.debug(
    { platformConfig },
    `platformConfig for ${config.projectKey}/${config.repositorySlug}`
  );
  return platformConfig;
}