Skip to content
This repository has been archived by the owner on May 1, 2019. It is now read-only.

Fix: added github repo exists check #317

Merged
merged 2 commits into from
Jan 24, 2015
Merged

Conversation

ins0
Copy link
Contributor

@ins0 ins0 commented Jan 23, 2015

fixes #182
fixes #158

but we need a solution in the future where such repos gets deleted from the db

if (!$result) {
$repository = $this->repositoryRetriever->getUserRepositoryMetadata($vendor, $module);

if (!$result || !$repository) {
$this->getResponse()->setStatusCode(Http\Response::STATUS_CODE_404);
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should return the response here to short circuit the rest of the dispatch process.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah will recode the logic so in case a repository is not exists we can save 1 api call

@GeeH
Copy link
Contributor

GeeH commented Jan 24, 2015

I think it's absolutely appropriate that our site 404s if the github repo doesn't exists. In an ideal world we would remove the module from our DB too (or flag it as hidden).

@ins0
Copy link
Contributor Author

ins0 commented Jan 24, 2015

the only problem i see what if the github api is down this would leed to a repository false flag - maybe some crontab that checks flagged repos once a week and delete them from the db

GeeH added a commit that referenced this pull request Jan 24, 2015
Fix: added github repo exists check
@GeeH GeeH merged commit 0880e58 into zendframework:master Jan 24, 2015
@ins0 ins0 deleted the fix/182 branch January 24, 2015 15:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants