Check if you are starring a repository

@link https://developer.github.com/v3/activity/starring/#check-if-you-are-starring-a-repository
@return bool
350170
public function checkYouAreStarringRepository(): bool
    {
        $this->getApi()->request($this->getApi()
                                      ->sprintf('/user/starred/:owner/:repo', $this->getActivity()->getOwner(),
                                          $this->getActivity()->getRepo()));

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }
631687
public function checkVcs()
    {
        // Cancel if not using any VCS
        if (mb_strtolower($this->config->getContextually('strategies.create-release')) !== 'clone') {
            return true;
        }

        $this->explainer->line('Checking presence of '.$this->vcs->getBinary());
        $results = $this->vcs->run('check');
        $this->toOutput($results);

        $isPresent = $this->status();
        if (!$isPresent) {
            $this->explainer->error($this->vcs->getBinary().' could not be found');
        }

        return $isPresent;
    }
317127
public function push() {
		if ( $this->remote ) {
			Log::instance()->write( 'Snapshot already pushed.', 0, 'error' );
			return false;
		}

		$repository = RepositoryManager::instance()->setup( $this->repository_name );

		if ( ! $repository ) {
			Log::instance()->write( 'Could not setup repository.', 0, 'error' );

			return false;
		}

		/**
		 * Put files to S3
		 */
		Log::instance()->write( 'Uploading files (' . Utils\format_bytes( $this->meta['size'] ) . ')...' );

		$s3_add = $repository->getS3()->putSnapshot( $this->id, $this->meta['project'], Utils\get_snapshot_directory() . $this->id . '/data.sql.gz', Utils\get_snapshot_directory() . $this->id . '/files.tar.gz' );

		if ( ! $s3_add ) {
			Log::instance()->write( 'Could not upload files to S3.', 0, 'error' );

			return false;
		}

		/**
		 * Add snapshot to DB
		 */
		Log::instance()->write( 'Adding snapshot to database...' );

		$inserted_snapshot = $repository->getDB()->insertSnapshot( $this->id, $this->meta );

		if ( ! $inserted_snapshot ) {
			Log::instance()->write( 'Could not add snapshot to database.', 0, 'error' );

			return false;
		}

		$this->remote = true;

		return true;
	}
316338
public function run() {
		if ( null === $this->repo ) {
			return false;
		}

		$headers = $this->parse_header_uri( $this->repo->languages );
		$this->repo_api->get_language_pack( $headers );

		add_filter( 'site_transient_update_plugins', [ $this, 'update_site_transient' ] );
		add_filter( 'site_transient_update_themes', [ $this, 'update_site_transient' ] );
	}
1172874
public function __isAllowed()
    {
        if ($this->checkAuthentication !== true) {
            // this controller is not responsible for the authentication
            return false;
        }

        $this->typo3Loader->initializeFrontEndUser($this->determinePageIdFromArguments());

        $feUser = $this->typo3Loader->getFrontEndUser();
        if ($feUser->user === null) {
            return false;
        }
        return true;
    }
1347780
def repository(name):
    """"""
    user_id = current_user.id
    github = GitHubAPI(user_id=user_id)
    token = github.session_token

    if token:
        repos = github.account.extra_data.get('repos', [])
        repo = next((repo for repo_id, repo in repos.items()
                     if repo.get('full_name') == name), {})
        if not repo:
            abort(403)

        try:
            # NOTE: Here we do not check for repository ownership, since it
            # might have changed even though the user might have made releases
            # in the past.
            repo_instance = Repository.get(user_id=user_id,
                                           github_id=repo['id'],
                                           check_owner=False)
        except RepositoryAccessError:
            abort(403)
        except NoResultFound:
            repo_instance = Repository(name=repo['full_name'],
                                       github_id=repo['id'])

        releases = [
            current_github.release_api_class(r) for r in (
                repo_instance.releases.order_by(db.desc(Release.created)).all()
                if repo_instance.id else []
            )
        ]
        return render_template(
            current_app.config['GITHUB_TEMPLATE_VIEW'],
            repo=repo_instance,
            releases=releases,
            serializer=current_github.record_serializer,
        )

    abort(403)
973060
public function allAction()
    {
        $repository = $this->container->get('request')->get('repository');
        $response = new JsonResponse();

        if (!$this->isValidRepositoryName($repository)) {
            $response->setData(array('msg' => 'Package not found. Please check the package name. eg. (symfony/symfony)'));
            $response->setStatusCode(404);

            return $response;
        }

        try {
            $badges = $this->container->get('snippet_generator')->generateAllSnippets($repository);
            $response->setData($badges);
        } catch (ClientErrorResponseException $e) {
            $response->setData(array('msg' => 'Package not found. Please check the package name. eg. (symfony/symfony)'));
            $response->setStatusCode(404);
        } catch (\Exception $e) {
            $response->setData(array('msg' => 'Server Error'));
            $response->setStatusCode(500);
        }

        return $response;
    }
953963
public function isAppReadyToInstall() {
		$checkPHPversion = $this->checkPhpVersion();
		if ($checkPHPversion === false) {
			return false;
		}

		$checkPHPextensions = $this->checkPhpExtensions(true);
		if ($checkPHPextensions === false) {
			return false;
		}

		return true;
	}
677768
public boolean isSet(String propName) {
        if (propName.equals("repositoryId")) {
            return isSetRepositoryId();
        }
        if (propName.equals("repositoryCheckPoint")) {
            return isSetRepositoryCheckPoint();
        }
        return false;
    }
544781
public function isAttached()
    {
        try {
            if( $repository = $this->r() ) {
                return $repository->isAttached( $this );
            }
        } catch ( EntityMissingEntityManagerException $e ) {
        }

        throw new \LogicException( "We've not got a repository configured for this entity. I can't answer this question." );
    }
515740
public function isGuestAllowed()
    {
        if (null === $user = $this['repo.users']->findByLogin(User::USER_GUEST)) {
            return false;
        }

        return count($this->getAclForUser($user)->get_granted_base()) > 0;
    }
1363869
protected function hasToBeAuthorized()
    {
        if ( in_array($this->route->getName(), self::$except) ) return false;

        return (bool) $this->route->getName();
    }
1024615
static public function isSysCompanyUser(){
         if(Yii::app()->user->isGuest){
             return FALSE;
         }
         $a = self::getRoles();
         return isset($a[self::RoleSysCompanyUser]);
     }
1309166
public function isPending()
    {
        $app = App::getInstance();

        if ($this->getActive()
            && $this->getPending()
            && $this->getIp() == $app['env']['RemoteIP']
        ) { // if comment is pending for this ip address
            return true;
        } else {
            return false;
        }
    }
114584
protected function registerReminderRepository()
	{
		$this->app->bindShared('auth.reminder.repository', function($app)
		{
			$connection = $app['db']->connection();

			// The database reminder repository is an implementation of the reminder repo
			// interface, and is responsible for the actual storing of auth tokens and
			// their e-mail addresses. We will inject this table and hash key to it.
			$table = $app['config']['auth.reminder.table'];

			$key = $app['config']['app.key'];

			$expire = $app['config']->get('auth.reminder.expire', 60);

			return new DbRepository($connection, $table, $key, $expire);
		});
	}
373202
public function isAuthenticated()
    {
        if (!$this->session->has('usr_id')) {
            return false;
        }

        if ($this->session->has('session_id')) {
            if (null !== $this->app['repo.sessions']->find($this->session->get('session_id'))) {
                return true;
            }
        }

        $this->session->invalidate();
        $this->reinitUser();

        return false;
    }
914695
public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
    {
        if (false === parent::isInstalled($repo, $package)) {
            return false;
        }

        $targetRoot = $this->getContaoRoot();

        foreach ($this->getSources($package) as $targetPath) {
            if (!file_exists($this->filesystem->normalizePath($targetRoot . '/' . $targetPath))) {
                return false;
            }
        }

        return true;
    }