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

[WIP] Show contributors last week at bottom of page #73

Merged
merged 1 commit into from
Oct 22, 2018

Conversation

Rishabh570
Copy link
Collaborator

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 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,

issue_57_3

@jywarren
Copy link
Member

jywarren commented Oct 17, 2018 via email

@Rishabh570
Copy link
Collaborator Author

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.

@jywarren
Copy link
Member

jywarren commented Oct 17, 2018 via email

@jywarren
Copy link
Member

jywarren commented Oct 17, 2018 via email

@jywarren
Copy link
Member

jywarren commented Oct 17, 2018 via email

@Rishabh570
Copy link
Collaborator Author

Ah, so does this PR do that or is it a different implementation?

This PR includes that :)

@Rishabh570
Copy link
Collaborator Author

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 :-)))

Sure, we'll go step by step :)

@Rishabh570
Copy link
Collaborator Author

@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).
But the effect is not much noticeable...Please take a look...

ezgif com-optimize

@Rishabh570
Copy link
Collaborator Author

@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,

output_nch18k

@jywarren
Copy link
Member

Wow, this is great. Do you think it's ready to merge, then?

@Rishabh570
Copy link
Collaborator Author

@jywarren Yes, its all set!!

@jywarren jywarren merged commit c10ad24 into publiclab:main Oct 22, 2018
@jywarren
Copy link
Member

Awesome! I will publish shortly!

TildaDares pushed a commit to TildaDares/community-toolbox that referenced this pull request Apr 28, 2021
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.

2 participants