Skip to content
This repository has been archived by the owner on Jan 16, 2020. It is now read-only.

New scripts to fetch github data and update pluginsdb. #137

Closed
wants to merge 8 commits into from

Conversation

aulvi
Copy link

@aulvi aulvi commented May 28, 2013

update-plugin-stats.js is the main entry point, this should be called via cron.

github-stats.js simply takes a Plugins object and returns an updated Plugins object with new 'watchers' and 'forks' data.

@@ -0,0 +1,89 @@
/* jshint laxcomma: true */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No one-off rules.

@scottgonzalez
Copy link
Contributor

You should read our style guide.

The github-stats.js file doesn't belong in the scripts directory, since it has exports and won't do anything if run directly. This logic should just be implemented in lib/service/github.js.

});

res.on("end", function () {
switch (res.statusCode) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No switch statements unless you're using fall-through. Switch to if.

@scottgonzalez
Copy link
Contributor

Based on discussion in IRC just now, we'll use a long running script instead of a cron job. We'll process one plugin per minute, which should allow us to process all plugins in one day right now.

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

Successfully merging this pull request may close these issues.

2 participants