{"action":"created","comment":{"url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/comments/121291903","pull_request_review_id":43329178,"id":121291903,"diff_hunk":"@@ -0,0 +1,31 @@\n+//\n+//  EventRanking.swift\n+//  the-blue-alliance-ios\n+//\n+//  Created by Bryton Moeller on 6/1/17.\n+//  Copyright © 2017 The Blue Alliance. All rights reserved.\n+//\n+\n+import Foundation\n+import TBAKit\n+import CoreData\n+\n+extension EventRanking: Managed {\n+    \n+    static func insert(with model: TBAEventRanking, for event: Event, for team: Team, in context: NSManagedObjectContext) -> EventRanking {\n+        let predicate = NSPredicate(format: \"event == %@ AND team == %@\", event, team)\n+        return findOrCreate(in: context, matching: predicate, configure: { (ranking) in\n+            ranking.event = event\n+            ranking.team = team\n+            if let qualAverage = model.qualAverage {","path":"the-blue-alliance-ios/Core Data/EventRanking.swift","position":20,"original_position":20,"commit_id":"0c1dc1ea97384e5b0c0b2cfe42c303525db88841","original_commit_id":"0c1dc1ea97384e5b0c0b2cfe42c303525db88841","user":{"login":"rytonbay","id":5697081,"avatar_url":"https://avatars2.githubusercontent.com/u/5697081?v=3","gravatar_id":"","url":"https://api.github.com/users/rytonbay","html_url":"https://github.com/rytonbay","followers_url":"https://api.github.com/users/rytonbay/followers","following_url":"https://api.github.com/users/rytonbay/following{/other_user}","gists_url":"https://api.github.com/users/rytonbay/gists{/gist_id}","starred_url":"https://api.github.com/users/rytonbay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rytonbay/subscriptions","organizations_url":"https://api.github.com/users/rytonbay/orgs","repos_url":"https://api.github.com/users/rytonbay/repos","events_url":"https://api.github.com/users/rytonbay/events{/privacy}","received_events_url":"https://api.github.com/users/rytonbay/received_events","type":"User","site_admin":false},"body":"Yes!","created_at":"2017-06-11T21:20:20Z","updated_at":"2017-06-11T21:20:20Z","html_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/81#discussion_r121291903","pull_request_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/81","_links":{"self":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/comments/121291903"},"html":{"href":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/81#discussion_r121291903"},"pull_request":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/81"}}},"pull_request":{"url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/81","id":123861850,"html_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/81","diff_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/81.diff","patch_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/81.patch","issue_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/81","number":81,"state":"open","locked":false,"title":"Event Rankings","user":{"login":"rytonbay","id":5697081,"avatar_url":"https://avatars2.githubusercontent.com/u/5697081?v=3","gravatar_id":"","url":"https://api.github.com/users/rytonbay","html_url":"https://github.com/rytonbay","followers_url":"https://api.github.com/users/rytonbay/followers","following_url":"https://api.github.com/users/rytonbay/following{/other_user}","gists_url":"https://api.github.com/users/rytonbay/gists{/gist_id}","starred_url":"https://api.github.com/users/rytonbay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rytonbay/subscriptions","organizations_url":"https://api.github.com/users/rytonbay/orgs","repos_url":"https://api.github.com/users/rytonbay/repos","events_url":"https://api.github.com/users/rytonbay/events{/privacy}","received_events_url":"https://api.github.com/users/rytonbay/received_events","type":"User","site_admin":false},"body":"Here it is with event rankings! Will also submit a PR to TBAKit.","created_at":"2017-06-04T01:24:06Z","updated_at":"2017-06-11T21:20:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6889314942c904c30e4389c448f2c20ef49288ef","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/81/commits","review_comments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/81/comments","review_comment_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/81/comments","statuses_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/statuses/0c1dc1ea97384e5b0c0b2cfe42c303525db88841","head":{"label":"rytonbay:swift","ref":"swift","sha":"0c1dc1ea97384e5b0c0b2cfe42c303525db88841","user":{"login":"rytonbay","id":5697081,"avatar_url":"https://avatars2.githubusercontent.com/u/5697081?v=3","gravatar_id":"","url":"https://api.github.com/users/rytonbay","html_url":"https://github.com/rytonbay","followers_url":"https://api.github.com/users/rytonbay/followers","following_url":"https://api.github.com/users/rytonbay/following{/other_user}","gists_url":"https://api.github.com/users/rytonbay/gists{/gist_id}","starred_url":"https://api.github.com/users/rytonbay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rytonbay/subscriptions","organizations_url":"https://api.github.com/users/rytonbay/orgs","repos_url":"https://api.github.com/users/rytonbay/repos","events_url":"https://api.github.com/users/rytonbay/events{/privacy}","received_events_url":"https://api.github.com/users/rytonbay/received_events","type":"User","site_admin":false},"repo":{"id":93109774,"name":"the-blue-alliance-ios","full_name":"rytonbay/the-blue-alliance-ios","owner":{"login":"rytonbay","id":5697081,"avatar_url":"https://avatars2.githubusercontent.com/u/5697081?v=3","gravatar_id":"","url":"https://api.github.com/users/rytonbay","html_url":"https://github.com/rytonbay","followers_url":"https://api.github.com/users/rytonbay/followers","following_url":"https://api.github.com/users/rytonbay/following{/other_user}","gists_url":"https://api.github.com/users/rytonbay/gists{/gist_id}","starred_url":"https://api.github.com/users/rytonbay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rytonbay/subscriptions","organizations_url":"https://api.github.com/users/rytonbay/orgs","repos_url":"https://api.github.com/users/rytonbay/repos","events_url":"https://api.github.com/users/rytonbay/events{/privacy}","received_events_url":"https://api.github.com/users/rytonbay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rytonbay/the-blue-alliance-ios","description":"An iOS app for accessing information about the FIRST Robotics Competition.","fork":true,"url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios","forks_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/forks","keys_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/teams","hooks_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/hooks","issue_events_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/issues/events{/number}","events_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/events","assignees_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/assignees{/user}","branches_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/branches{/branch}","tags_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/tags","blobs_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/languages","stargazers_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/stargazers","contributors_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/contributors","subscribers_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/subscribers","subscription_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/subscription","commits_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/contents/{+path}","compare_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/merges","archive_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/downloads","issues_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/issues{/number}","pulls_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/labels{/name}","releases_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/releases{/id}","deployments_url":"https://api.github.com/repos/rytonbay/the-blue-alliance-ios/deployments","created_at":"2017-06-02T00:06:48Z","updated_at":"2017-06-02T00:06:51Z","pushed_at":"2017-06-04T01:25:50Z","git_url":"git://github.com/rytonbay/the-blue-alliance-ios.git","ssh_url":"git@github.com:rytonbay/the-blue-alliance-ios.git","clone_url":"https://github.com/rytonbay/the-blue-alliance-ios.git","svn_url":"https://github.com/rytonbay/the-blue-alliance-ios","homepage":null,"size":10109,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"swift"}},"base":{"label":"the-blue-alliance:swift","ref":"swift","sha":"08b39b960168ae02f172f64bcf2171ac233b743f","user":{"login":"the-blue-alliance","id":7354965,"avatar_url":"https://avatars3.githubusercontent.com/u/7354965?v=3","gravatar_id":"","url":"https://api.github.com/users/the-blue-alliance","html_url":"https://github.com/the-blue-alliance","followers_url":"https://api.github.com/users/the-blue-alliance/followers","following_url":"https://api.github.com/users/the-blue-alliance/following{/other_user}","gists_url":"https://api.github.com/users/the-blue-alliance/gists{/gist_id}","starred_url":"https://api.github.com/users/the-blue-alliance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-blue-alliance/subscriptions","organizations_url":"https://api.github.com/users/the-blue-alliance/orgs","repos_url":"https://api.github.com/users/the-blue-alliance/repos","events_url":"https://api.github.com/users/the-blue-alliance/events{/privacy}","received_events_url":"https://api.github.com/users/the-blue-alliance/received_events","type":"Organization","site_admin":false},"repo":{"id":18974950,"name":"the-blue-alliance-ios","full_name":"the-blue-alliance/the-blue-alliance-ios","owner":{"login":"the-blue-alliance","id":7354965,"avatar_url":"https://avatars3.githubusercontent.com/u/7354965?v=3","gravatar_id":"","url":"https://api.github.com/users/the-blue-alliance","html_url":"https://github.com/the-blue-alliance","followers_url":"https://api.github.com/users/the-blue-alliance/followers","following_url":"https://api.github.com/users/the-blue-alliance/following{/other_user}","gists_url":"https://api.github.com/users/the-blue-alliance/gists{/gist_id}","starred_url":"https://api.github.com/users/the-blue-alliance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-blue-alliance/subscriptions","organizations_url":"https://api.github.com/users/the-blue-alliance/orgs","repos_url":"https://api.github.com/users/the-blue-alliance/repos","events_url":"https://api.github.com/users/the-blue-alliance/events{/privacy}","received_events_url":"https://api.github.com/users/the-blue-alliance/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios","description":"An iOS app for accessing information about the FIRST Robotics Competition.","fork":false,"url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios","forks_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/forks","keys_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/teams","hooks_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/hooks","issue_events_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/events{/number}","events_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/events","assignees_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/assignees{/user}","branches_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/branches{/branch}","tags_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/tags","blobs_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/languages","stargazers_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/stargazers","contributors_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/contributors","subscribers_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/subscribers","subscription_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/subscription","commits_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/contents/{+path}","compare_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/merges","archive_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/downloads","issues_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues{/number}","pulls_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/labels{/name}","releases_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/releases{/id}","deployments_url":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/deployments","created_at":"2014-04-20T22:07:09Z","updated_at":"2017-05-26T02:47:20Z","pushed_at":"2017-06-11T19:06:22Z","git_url":"git://github.com/the-blue-alliance/the-blue-alliance-ios.git","ssh_url":"git@github.com:the-blue-alliance/the-blue-alliance-ios.git","clone_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios.git","svn_url":"https://github.com/the-blue-alliance/the-blue-alliance-ios","homepage":null,"size":10219,"stargazers_count":22,"watchers_count":22,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":11,"forks":7,"open_issues":11,"watchers":22,"default_branch":"swift"}},"_links":{"self":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/81"},"html":{"href":"https://github.com/the-blue-alliance/the-blue-alliance-ios/pull/81"},"issue":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/81"},"comments":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/issues/81/comments"},"review_comments":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/81/comments"},"review_comment":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/pulls/81/commits"},"statuses":{"href":"https://api.github.com/repos/the-blue-alliance/the-blue-alliance-ios/statuses/0c1dc1ea97384e5b0c0b2cfe42c303525db88841"}}}}
{"actor":{"display_login":"rytonbay"}}