Skip to content

Instantly share code, notes, and snippets.

@rjurney
Created May 31, 2013 19:16
Show Gist options
  • Save rjurney/5687269 to your computer and use it in GitHub Desktop.
Save rjurney/5687269 to your computer and use it in GitHub Desktop.
Github Archive CreateEvent
{
"type": "CreateEvent",
"actor": {
"avatar_url": "https://secure.gravatar.com/avatar/8c315bedc4ab1b9aef8f9b446030daac?d=http://github.dev%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
"url": "https://api.github.dev/users/vinced45",
"login": "vinced45",
"id": 101286,
"gravatar_id": "8c315bedc4ab1b9aef8f9b446030daac"
},
"repo": {
"url": "https://api.github.dev/repos/vinced45/siriproxy-mashable",
"id": 3081234,
"name": "vinced45/siriproxy-mashable"
},
"public": true,
"payload": {
"ref_type": "repository",
"description": "Siri Proxy Plugin to get news from Mashable",
"master_branch": "master",
"ref": null
},
"id": "1508512425",
"created_at": "2012-01-01T00:03:28Z"
}
/* Create repository event - strongest association with a repo possible */
create_events = LOAD '/tmp/CreateEvent' as (json: map[]); /* s3://github-explorer/CreateEvent */
create_ratings = FOREACH create_events GENERATE (chararray)$0#'actor_attributes'#'login' AS follower:chararray,
StringConcat((chararray)$0#'repository'#'owner', '/', $0#'repository'#'name') AS repo:chararray,
4.0 AS rating;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment