-
Notifications
You must be signed in to change notification settings - Fork 199
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
[WIP] Show contributors last week at bottom of page #73
Conversation
Sorry I'm on my phone so can't read code easily, but couldn't we record
last date of interaction on the initial request rather than running new
requests?
Thanks!!!
…On Wed, Oct 17, 2018, 1:09 PM Rishabh Rawat ***@***.***> wrote:
Fixes #57 <#57>
@jywarren <https://github.com/jywarren> This PR achieves what is the
issue was about but there's a problem, we can't make so many
unauthenticated requests to the Github API and fetching contributors (on
code.publiclab.org and code.publiclab.org#r=all page) empties the hourly
quota i.e., 60 requests. After all of this, making a chunk of requests for
commits of all the repos will surely get us *403*
Btw here is the working GIF,
[image: issue_57_3]
<https://user-images.githubusercontent.com/25483260/47063328-3967d200-d1f8-11e8-91a9-6844c294f953.gif>
------------------------------
You can view, comment on, or merge this pull request online at:
#73
Commit Summary
- Show contributors last week at bottom of page.
File Changes
- *M* dist/community-toolbox.js
<https://github.com/publiclab/community-toolbox/pull/73/files#diff-0>
(141)
- *M* index.html
<https://github.com/publiclab/community-toolbox/pull/73/files#diff-1>
(14)
- *M* src/community-toolbox.js
<https://github.com/publiclab/community-toolbox/pull/73/files#diff-2>
(69)
- *A* src/getRecentCommitsUtility.js
<https://github.com/publiclab/community-toolbox/pull/73/files#diff-3>
(41)
- *M* src/ui.js
<https://github.com/publiclab/community-toolbox/pull/73/files#diff-4>
(12)
Patch Links:
- https://github.com/publiclab/community-toolbox/pull/73.patch
- https://github.com/publiclab/community-toolbox/pull/73.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#73>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AABfJ8PhVy1ZsYAw8RDwU95zE190HH6Oks5ulrtagaJpZM4XjJDa>
.
|
Yes, we just have to fetch the commits one time, after that they get stored to localStorage along with the the time (in epoch)...we make a fresh request after every 24hrs. |
Ah, so does this PR do that or is it a different implementation? Thanks for
explaining! I'm on a train without good internet. Thanks!
…On Wed, Oct 17, 2018, 1:16 PM Rishabh Rawat ***@***.***> wrote:
Yes, we just have to fetch the commits one time, after that they get
stored to localStorage along with the the time (in epoch)...we make a fresh
request after every 24hrs.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJzYVtxNnDR1V9CHi9MDTzNcaYBHWks5ulr0kgaJpZM4XjJDa>
.
|
Also, Rishabh, you are doing so much for this repository. Perhaps you'd
like to be a collaborator on it so you can tag issues and do reviews and
such? :-)
You probably know the code better than I at this point!
…On Wed, Oct 17, 2018, 2:13 PM Jeffrey Warren ***@***.***> wrote:
Ah, so does this PR do that or is it a different implementation? Thanks
for explaining! I'm on a train without good internet. Thanks!
On Wed, Oct 17, 2018, 1:16 PM Rishabh Rawat ***@***.***>
wrote:
> Yes, we just have to fetch the commits one time, after that they get
> stored to localStorage along with the the time (in epoch)...we make a fresh
> request after every 24hrs.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#73 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AABfJzYVtxNnDR1V9CHi9MDTzNcaYBHWks5ulr0kgaJpZM4XjJDa>
> .
>
|
Once we have this feature by the way, we'll be able to do things like send
a weekly email to new contributors from the past week easily, and a
modification could let us see who's written a first timers only issue in
the past week. We could make a nice section of the welcome page just for
helping organize welcomers and such :-)))
…On Wed, Oct 17, 2018, 2:14 PM Jeffrey Warren ***@***.***> wrote:
Also, Rishabh, you are doing so much for this repository. Perhaps you'd
like to be a collaborator on it so you can tag issues and do reviews and
such? :-)
You probably know the code better than I at this point!
On Wed, Oct 17, 2018, 2:13 PM Jeffrey Warren ***@***.***> wrote:
> Ah, so does this PR do that or is it a different implementation? Thanks
> for explaining! I'm on a train without good internet. Thanks!
>
> On Wed, Oct 17, 2018, 1:16 PM Rishabh Rawat ***@***.***>
> wrote:
>
>> Yes, we just have to fetch the commits one time, after that they get
>> stored to localStorage along with the the time (in epoch)...we make a fresh
>> request after every 24hrs.
>>
>> —
>> You are receiving this because you were mentioned.
>> Reply to this email directly, view it on GitHub
>> <#73 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AABfJzYVtxNnDR1V9CHi9MDTzNcaYBHWks5ulr0kgaJpZM4XjJDa>
>> .
>>
>
|
This PR includes that :) |
Sure, we'll go step by step :) |
@jywarren To stay within API limits, I've taken 25 most active repos to get contributors from, 20 repos to get recent commits from...maybe we can increase 20 to 25 later (I need to do some testing for that). |
@jywarren Here is the working GIF, it turns out that it's not possible to increase the number of requests we make so now there are 20 repos from which we fetch all the contributors and recent contributors...but it didn't affect the output so much so it is okay I guess...please take a look, |
Wow, this is great. Do you think it's ready to merge, then? |
@jywarren Yes, its all set!! |
Awesome! I will publish shortly! |
Fixes #57
@jywarren This PR achieves what is the issue was about but there's a problem, we can't make so many unauthenticated requests to the Github API and fetching contributors (on
code.publiclab.org
andcode.publiclab.org#r=all
page) empties the hourly quota i.e., 60 requests. After all of this, making a chunk of requests for commits of all the repos will surely get us 403Btw here is the working GIF,