From d6a2375c12bda51a97f74e6417c3272079cb503f Mon Sep 17 00:00:00 2001 From: Dani Gellis Date: Thu, 12 Dec 2019 17:27:27 -0800 Subject: [PATCH 1/2] adds instructions to queue a user using the cli queue command --- README.md | 12 +++++++++++- bin/cc | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0bdb930..c1886ef 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The available commands are: `stop` -- Stop crawler processing. The crawler service is left running but it stops pulling requests off the queue. This is the same as `start 0`. - `queue ` -- Queues the given requests for processing. The requests parameter is a list of GitHub "org" and/or "org/repo" names. + `queue ` -- Queues the given requests for processing. The requests parameter is a list of GitHub "${org}" and/or "${org}/${repo}" and/or "users/${user}" names. `orgs ` -- Set the crawler's to traverse only the GitHub orgs named in the given list. @@ -43,6 +43,16 @@ http://localhost:3000> start 5 http://localhost:3000> exit ``` +Here's another example. If you want to queue up 2 users, without configuring an org, you can use this sequence. This is useful if you want to capture all events from a specific user or users. + +``` +> node bin/cc -i +http://localhost:3000> tokens 43984b2344ca575d0f0e097efd97#public 972bbdfe098098fa9ce082309#admin +http://localhost:3000> queue users/octocat users/microsoftopensource +http://localhost:3000> start 5 +http://localhost:3000> exit +``` + New commands are being added all the time. Check the help using `node bin/cc -help`. # API diff --git a/bin/cc b/bin/cc index cf3049c..f4b0b9c 100644 --- a/bin/cc +++ b/bin/cc @@ -43,7 +43,7 @@ function getCommands() { commands .command('queue ') .option('-q, --queue ', 'The queue onto which the requests are pushed') - .description('Queue the given list of orgs and/or repos to be processed.') + .description('Queue the given list of orgs and/or repos and/or users to be processed.') .action((requests, options) => queueRequests(requests, options)); commands .command('start [count]') From 776d8830264347937b569a8a01bc33e28067f682 Mon Sep 17 00:00:00 2001 From: Dani Gellis Date: Thu, 12 Dec 2019 18:09:34 -0800 Subject: [PATCH 2/2] make a few instructions in the README more clear --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c1886ef..474d0fe 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The `cc` utility is in the `bin` directory of this repo. It can be run interactively or as a single command processor. The general format of using the command line is ``` -node cc [options] [command] +node bin/cc [options] [command] ``` where the available options are: @@ -26,7 +26,7 @@ The available commands are: `queue ` -- Queues the given requests for processing. The requests parameter is a list of GitHub "${org}" and/or "${org}/${repo}" and/or "users/${user}" names. -`orgs ` -- Set the crawler's to traverse only the GitHub orgs named in the given list. +`orgs ` -- Set the crawlers to traverse only the GitHub orgs named in the given list. `config` -- Dumps the crawler service's configuration to the console. @@ -35,7 +35,7 @@ The available commands are: A typical sequence shown in the snippet below configures the crawler with a set of tokens, configures the org filter set and then queues and starts the processing of the org. ``` -> node bin/cc +> node bin/cc -i http://localhost:3000> tokens 43984b2344ca575d0f0e097efd97#public 972bbdfe098098fa9ce082309#admin http://localhost:3000> orgs contoso-d http://localhost:3000> queue contoso-d