mdo / github-buttons

Showcase the success of any GitHub repo or user with these simple, static buttons with dynamic counts.

Home Page:https://ghbtns.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"count" doesn't work if the repo name has a period ( . ) in it

TooTallNate opened this issue · comments

For example, this works:

http://ghbtns.com/github-btn.html?user=TooTallNate&type=watch&count=true&size=large&repo=node-lame

screen shot 2014-05-21 at 3 00 32 pm

But, this does not work, and outputs "undefined" for the watcher count.

http://ghbtns.com/github-btn.html?user=TooTallNate&type=watch&count=true&size=large&repo=mpg123.js

screen shot 2014-05-21 at 3 00 46 pm

Probably some kind of encoding/escaping issue…

Seems to be an issue with the Github API actually. I can't get it to return a document for me when there's a . in the repo name:

https://api.github.com/repos/TooTallNate/mpg123.js?callback=callback

https://api.github.com/repos/TooTallNate/mpg123%2ejs?callback=callback

^ both 404 for me :(

Wow, disregard. I'm dumb... mpg123.js is not open-source, so of course it will 404.

For comparison, this works fine:

https://api.github.com/repos/TooTallNate/ansi.js?callback=callback

Closing!