Hello, I'm aware of the reasons for why RailsDiff.org stops working if your IP exceeds the unauthenticated API limit of 60 requests an hour, as discussed in #582.
A solution could be to optionally request a GitHub Personal Access Token from the user (only needs the public_repo scope ticked), store it in a browser session, and send this along with each request.
Request:
Please could the site be updated to show a warning if a 403 rate limit error is received from the API?
At present this is unhandled and just "hangs" with no feedback to the user that the issue is technically at their end, not with RailsDiff.
Workaround:
The workaround for anyone affected by this is to:
- Make a token (as above)
- Clone the repo, and follow the README installation instructions
- Edit
app/api/github.ts and make the following change to add the auth option to the Octokit initialiser around line 12:
const github_token = "ghp_mytoken123123123123";
const octokit = new Octokit({ auth: github_token });
- Then run
ember serve --environment production and visit http://localhost:4200/ - Using the production environment is the key undocumented bit as otherwise you'll only see dummy diff data.
I apologise for not creating a proper PR with the necessary UI changes, etc, but I'm not familiar with Ember at present. I thought it would be helpful to document a (clunky) way to get around this issue in the meantime.
Thanks for making such a great tool!
Hello, I'm aware of the reasons for why RailsDiff.org stops working if your IP exceeds the unauthenticated API limit of 60 requests an hour, as discussed in #582.
A solution could be to optionally request a GitHub Personal Access Token from the user (only needs the
public_reposcope ticked), store it in a browser session, and send this along with each request.Request:
Please could the site be updated to show a warning if a 403 rate limit error is received from the API?
At present this is unhandled and just "hangs" with no feedback to the user that the issue is technically at their end, not with RailsDiff.
Workaround:
The workaround for anyone affected by this is to:
app/api/github.tsand make the following change to add theauthoption to the Octokit initialiser around line 12:ember serve --environment productionand visit http://localhost:4200/ - Using theproductionenvironment is the key undocumented bit as otherwise you'll only see dummy diff data.I apologise for not creating a proper PR with the necessary UI changes, etc, but I'm not familiar with Ember at present. I thought it would be helpful to document a (clunky) way to get around this issue in the meantime.
Thanks for making such a great tool!