GitHub API fix #21

merged 2 commits into from Aug 9, 2012

2 participants

PEAR2 member

It seems GitHub have removed their v2 API, since June, as described in their change log. The links on the site still work, but they appear completely frozen.

The patch here should make the issue links work again, with the v3 API. It also abstracts away a few things in the model to make it a little more DRY.

boenrobot added some commits Aug 9, 2012
@boenrobot boenrobot Changed GitHub API to v3;
Added $shortName to the package model, with a getter;
Moved link base to a new GIT_HUB_LINK constant.
@boenrobot boenrobot Abstracted away getGitHubClosedIssueCount() and getGitHubOpenIssueCou…
…nt() into getGitHubIssueCount($state).
@saltybeagle saltybeagle merged commit 2ec00fe into pear2:master Aug 9, 2012
PEAR2 member

Whoops — [Thu Aug 09 16:31:00 2012] [error] [client] PHP Fatal error: Cannot pass parameter 4 by reference in /var/www/html/ on line 20, referer:

PEAR2 member


Well, suits me right for not actually testing a live copy. I thought the $count in str_replace was supposed to place a limit on replacements, and now I see that's not what it's for.

Sorry about that. I've updated my branch. It's just a matter of removing the ",1" part. Should I do a new pull request, or could you perhaps "re"-pull/fix it in this copy?

This was referenced Aug 12, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment