Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added curl for fetching badges and header for github authorization #3

Merged
merged 7 commits into from
Nov 24, 2015
Merged

Conversation

bogdanRada
Copy link
Contributor

Also i added posibility to log all curl requests to a log file so that will be easier to debug next time something happens..

For github authorization to work, you must go into your profile here: https://github.com/settings/tokens and create a token, then go to Heroku.com, to your application in Settings tab under Config variables , add new config variable with name GITHUB_API_KEY and put the token generated previously to the value attribute

Then you can deploy this and everything wil work

The reason why this is needed is because you're doing unauthenticated requests, which now has a limit of 60 requests allowed per hour, but this is used in 75 repositories at the moment.

Doing authenticated requests, will allow you to do 5000 requests per hour, and this will solve this problem with badges.

Please let me know what you think . Thank you very much.

@ruddfawcett
Copy link
Owner

Thanks, I'll take a look!

@ruddfawcett
Copy link
Owner

I'm currently working on another project, so I don't really have time to pursue this further. However, if you can get this working on another Heroku server, I'd be more than happy to merge any further changes. Thasnk! 😄

@bogdanRada
Copy link
Contributor Author

I fixed the problem. Forgot that getenv is a function not a array.

Here is a demo:

  ![](https://reposs-badge.herokuapp.com/?path=rails/rails)

ruddfawcett pushed a commit that referenced this pull request Nov 24, 2015
Added curl for fetching badges and header for github authorization
@ruddfawcett ruddfawcett merged commit 496bbb2 into ruddfawcett:master Nov 24, 2015
@ruddfawcett
Copy link
Owner

Thanks for your work on this! ⭐️

@bogdanRada
Copy link
Contributor Author

my pleasure :)

@thatsIch
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants