{"action":"created","comment":{"url":"https://api.github.com/repos/mdiep/Tentacle/pulls/comments/70905126","id":70905126,"diff_hunk":"@@ -0,0 +1,106 @@\n+//\n+//  Issue.swift\n+//  Tentacle\n+//\n+//  Created by Romain Pouclet on 2016-05-23.\n+//  Copyright © 2016 Matt Diephouse. All rights reserved.\n+//\n+\n+import Argo\n+import Curry\n+\n+/// An Issue on Github\n+public struct Issue: Hashable, CustomStringConvertible {\n+    public enum State: String {\n+\t\tcase Open = \"open\"\n+        case Closed = \"closed\"\n+\t}\n+\t\n+    public let id: Int\n+    public let url: NSURL?\n+\n+\tpublic let number: Int\n+\tpublic let state: State\n+\tpublic let title: String\n+\tpublic let body: String\n+\tpublic let user: User?\n+\tpublic let labels: [Label]\n+\tpublic let assignee: User?\n+\tpublic let milestone: Milestone?\n+\tpublic let locked: Bool\n+\tpublic let comments: Int\n+    public let pullRequest: PullRequest?\n+\tpublic let closedAt: NSDate?\n+\tpublic let createdAt: NSDate?\n+\tpublic let updatedAt: NSDate?\n+\n+    public var hashValue: Int {\n+        return id.hashValue\n+    }\n+\n+    public var description: String {\n+        return title\n+    }\n+\n+    public init(id: Int, url: NSURL?, number: Int, state: State, title: String, body: String, user: User, labels: [Label], assignee: User?, milestone: Milestone?, locked: Bool, comments: Int, pullRequest: PullRequest?, closedAt: NSDate?, createdAt: NSDate?, updatedAt: NSDate?) {\n+        self.id = id\n+        self.url = url\n+        self.number = number\n+        self.state = state\n+        self.title = title\n+        self.body = body\n+        self.user = user\n+        self.milestone = milestone\n+        self.locked = locked\n+        self.comments = comments\n+        self.pullRequest = pullRequest\n+        self.labels = labels\n+        self.assignee = assignee\n+        self.closedAt = closedAt\n+        self.createdAt = createdAt\n+        self.updatedAt = updatedAt\n+    }\n+\n+}\n+\n+public func ==(lhs: Issue, rhs: Issue) -> Bool {\n+    return lhs.id == rhs.id\n+        && lhs.url == rhs.url\n+        && lhs.number == rhs.number\n+        && lhs.state == rhs.state\n+        && lhs.title == rhs.title\n+        && lhs.body == rhs.body\n+        && lhs.locked == rhs.locked\n+        && lhs.comments == rhs.comments\n+        && lhs.createdAt == rhs.createdAt\n+        && lhs.updatedAt == rhs.updatedAt\n+        && lhs.labels == rhs.labels\n+        && lhs.milestone == rhs.milestone\n+        && lhs.pullRequest == rhs.pullRequest\n+}\n+\n+extension Issue: ResourceType {\n+    public static func decode(j: JSON) -> Decoded<Issue> {\n+        let f = curry(Issue.init)\n+\n+        let closed_at: Decoded<NSDate?> = (j <|? \"closed_at\").flatMap(toOptionalNSDate)\n+\n+        return f\n+            <^> j <| \"id\"\n+            <*> (j <| \"url\" >>- toNSURL)","path":"Tentacle/Issue.swift","position":90,"original_position":90,"commit_id":"83fd80cbfde8c0dc064fae4dbfdbe78f792f5147","original_commit_id":"83fd80cbfde8c0dc064fae4dbfdbe78f792f5147","user":{"login":"mdiep","id":1302,"avatar_url":"https://avatars.githubusercontent.com/u/1302?v=3","gravatar_id":"","url":"https://api.github.com/users/mdiep","html_url":"https://github.com/mdiep","followers_url":"https://api.github.com/users/mdiep/followers","following_url":"https://api.github.com/users/mdiep/following{/other_user}","gists_url":"https://api.github.com/users/mdiep/gists{/gist_id}","starred_url":"https://api.github.com/users/mdiep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdiep/subscriptions","organizations_url":"https://api.github.com/users/mdiep/orgs","repos_url":"https://api.github.com/users/mdiep/repos","events_url":"https://api.github.com/users/mdiep/events{/privacy}","received_events_url":"https://api.github.com/users/mdiep/received_events","type":"User","site_admin":false},"body":"Actually, we should add both. `url` should be `APIURL` and the `html_url` should be `URL`. That's what `Release` does.","created_at":"2016-07-15T00:14:06Z","updated_at":"2016-07-15T00:14:06Z","html_url":"https://github.com/mdiep/Tentacle/pull/28#discussion_r70905126","pull_request_url":"https://api.github.com/repos/mdiep/Tentacle/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/mdiep/Tentacle/pulls/comments/70905126"},"html":{"href":"https://github.com/mdiep/Tentacle/pull/28#discussion_r70905126"},"pull_request":{"href":"https://api.github.com/repos/mdiep/Tentacle/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/mdiep/Tentacle/pulls/28","id":71144555,"html_url":"https://github.com/mdiep/Tentacle/pull/28","diff_url":"https://github.com/mdiep/Tentacle/pull/28.diff","patch_url":"https://github.com/mdiep/Tentacle/pull/28.patch","issue_url":"https://api.github.com/repos/mdiep/Tentacle/issues/28","number":28,"state":"open","locked":false,"title":"Fetch current user's issues & a specific repository's issues","user":{"login":"Palleas","id":48797,"avatar_url":"https://avatars.githubusercontent.com/u/48797?v=3","gravatar_id":"","url":"https://api.github.com/users/Palleas","html_url":"https://github.com/Palleas","followers_url":"https://api.github.com/users/Palleas/followers","following_url":"https://api.github.com/users/Palleas/following{/other_user}","gists_url":"https://api.github.com/users/Palleas/gists{/gist_id}","starred_url":"https://api.github.com/users/Palleas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Palleas/subscriptions","organizations_url":"https://api.github.com/users/Palleas/orgs","repos_url":"https://api.github.com/users/Palleas/repos","events_url":"https://api.github.com/users/Palleas/events{/privacy}","received_events_url":"https://api.github.com/users/Palleas/received_events","type":"User","site_admin":false},"body":"Hello !\r\n\r\nIt's a WIP, but I figured I should open a PR just in case somebody is working on this too 😉 \r\n\r\nI'll update this soon! ","created_at":"2016-05-24T01:15:46Z","updated_at":"2016-07-15T00:14:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0de463edc42fc94b120f5f6907fa5ed7911fd2e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mdiep/Tentacle/pulls/28/commits","review_comments_url":"https://api.github.com/repos/mdiep/Tentacle/pulls/28/comments","review_comment_url":"https://api.github.com/repos/mdiep/Tentacle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mdiep/Tentacle/issues/28/comments","statuses_url":"https://api.github.com/repos/mdiep/Tentacle/statuses/83fd80cbfde8c0dc064fae4dbfdbe78f792f5147","head":{"label":"Palleas:user-issues","ref":"user-issues","sha":"83fd80cbfde8c0dc064fae4dbfdbe78f792f5147","user":{"login":"Palleas","id":48797,"avatar_url":"https://avatars.githubusercontent.com/u/48797?v=3","gravatar_id":"","url":"https://api.github.com/users/Palleas","html_url":"https://github.com/Palleas","followers_url":"https://api.github.com/users/Palleas/followers","following_url":"https://api.github.com/users/Palleas/following{/other_user}","gists_url":"https://api.github.com/users/Palleas/gists{/gist_id}","starred_url":"https://api.github.com/users/Palleas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Palleas/subscriptions","organizations_url":"https://api.github.com/users/Palleas/orgs","repos_url":"https://api.github.com/users/Palleas/repos","events_url":"https://api.github.com/users/Palleas/events{/privacy}","received_events_url":"https://api.github.com/users/Palleas/received_events","type":"User","site_admin":false},"repo":{"id":59529595,"name":"Tentacle","full_name":"Palleas/Tentacle","owner":{"login":"Palleas","id":48797,"avatar_url":"https://avatars.githubusercontent.com/u/48797?v=3","gravatar_id":"","url":"https://api.github.com/users/Palleas","html_url":"https://github.com/Palleas","followers_url":"https://api.github.com/users/Palleas/followers","following_url":"https://api.github.com/users/Palleas/following{/other_user}","gists_url":"https://api.github.com/users/Palleas/gists{/gist_id}","starred_url":"https://api.github.com/users/Palleas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Palleas/subscriptions","organizations_url":"https://api.github.com/users/Palleas/orgs","repos_url":"https://api.github.com/users/Palleas/repos","events_url":"https://api.github.com/users/Palleas/events{/privacy}","received_events_url":"https://api.github.com/users/Palleas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Palleas/Tentacle","description":"A Swift framework for the GitHub API","fork":true,"url":"https://api.github.com/repos/Palleas/Tentacle","forks_url":"https://api.github.com/repos/Palleas/Tentacle/forks","keys_url":"https://api.github.com/repos/Palleas/Tentacle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Palleas/Tentacle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Palleas/Tentacle/teams","hooks_url":"https://api.github.com/repos/Palleas/Tentacle/hooks","issue_events_url":"https://api.github.com/repos/Palleas/Tentacle/issues/events{/number}","events_url":"https://api.github.com/repos/Palleas/Tentacle/events","assignees_url":"https://api.github.com/repos/Palleas/Tentacle/assignees{/user}","branches_url":"https://api.github.com/repos/Palleas/Tentacle/branches{/branch}","tags_url":"https://api.github.com/repos/Palleas/Tentacle/tags","blobs_url":"https://api.github.com/repos/Palleas/Tentacle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Palleas/Tentacle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Palleas/Tentacle/git/refs{/sha}","trees_url":"https://api.github.com/repos/Palleas/Tentacle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Palleas/Tentacle/statuses/{sha}","languages_url":"https://api.github.com/repos/Palleas/Tentacle/languages","stargazers_url":"https://api.github.com/repos/Palleas/Tentacle/stargazers","contributors_url":"https://api.github.com/repos/Palleas/Tentacle/contributors","subscribers_url":"https://api.github.com/repos/Palleas/Tentacle/subscribers","subscription_url":"https://api.github.com/repos/Palleas/Tentacle/subscription","commits_url":"https://api.github.com/repos/Palleas/Tentacle/commits{/sha}","git_commits_url":"https://api.github.com/repos/Palleas/Tentacle/git/commits{/sha}","comments_url":"https://api.github.com/repos/Palleas/Tentacle/comments{/number}","issue_comment_url":"https://api.github.com/repos/Palleas/Tentacle/issues/comments{/number}","contents_url":"https://api.github.com/repos/Palleas/Tentacle/contents/{+path}","compare_url":"https://api.github.com/repos/Palleas/Tentacle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Palleas/Tentacle/merges","archive_url":"https://api.github.com/repos/Palleas/Tentacle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Palleas/Tentacle/downloads","issues_url":"https://api.github.com/repos/Palleas/Tentacle/issues{/number}","pulls_url":"https://api.github.com/repos/Palleas/Tentacle/pulls{/number}","milestones_url":"https://api.github.com/repos/Palleas/Tentacle/milestones{/number}","notifications_url":"https://api.github.com/repos/Palleas/Tentacle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Palleas/Tentacle/labels{/name}","releases_url":"https://api.github.com/repos/Palleas/Tentacle/releases{/id}","deployments_url":"https://api.github.com/repos/Palleas/Tentacle/deployments","created_at":"2016-05-24T01:13:46Z","updated_at":"2016-05-24T01:13:48Z","pushed_at":"2016-07-14T15:38:44Z","git_url":"git://github.com/Palleas/Tentacle.git","ssh_url":"git@github.com:Palleas/Tentacle.git","clone_url":"https://github.com/Palleas/Tentacle.git","svn_url":"https://github.com/Palleas/Tentacle","homepage":"","size":340,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mdiep:master","ref":"master","sha":"d7a837b18825df148f765c85ac8c29f2d4918eee","user":{"login":"mdiep","id":1302,"avatar_url":"https://avatars.githubusercontent.com/u/1302?v=3","gravatar_id":"","url":"https://api.github.com/users/mdiep","html_url":"https://github.com/mdiep","followers_url":"https://api.github.com/users/mdiep/followers","following_url":"https://api.github.com/users/mdiep/following{/other_user}","gists_url":"https://api.github.com/users/mdiep/gists{/gist_id}","starred_url":"https://api.github.com/users/mdiep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdiep/subscriptions","organizations_url":"https://api.github.com/users/mdiep/orgs","repos_url":"https://api.github.com/users/mdiep/repos","events_url":"https://api.github.com/users/mdiep/events{/privacy}","received_events_url":"https://api.github.com/users/mdiep/received_events","type":"User","site_admin":false},"repo":{"id":53076616,"name":"Tentacle","full_name":"mdiep/Tentacle","owner":{"login":"mdiep","id":1302,"avatar_url":"https://avatars.githubusercontent.com/u/1302?v=3","gravatar_id":"","url":"https://api.github.com/users/mdiep","html_url":"https://github.com/mdiep","followers_url":"https://api.github.com/users/mdiep/followers","following_url":"https://api.github.com/users/mdiep/following{/other_user}","gists_url":"https://api.github.com/users/mdiep/gists{/gist_id}","starred_url":"https://api.github.com/users/mdiep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdiep/subscriptions","organizations_url":"https://api.github.com/users/mdiep/orgs","repos_url":"https://api.github.com/users/mdiep/repos","events_url":"https://api.github.com/users/mdiep/events{/privacy}","received_events_url":"https://api.github.com/users/mdiep/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mdiep/Tentacle","description":"A Swift framework for the GitHub API","fork":false,"url":"https://api.github.com/repos/mdiep/Tentacle","forks_url":"https://api.github.com/repos/mdiep/Tentacle/forks","keys_url":"https://api.github.com/repos/mdiep/Tentacle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdiep/Tentacle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdiep/Tentacle/teams","hooks_url":"https://api.github.com/repos/mdiep/Tentacle/hooks","issue_events_url":"https://api.github.com/repos/mdiep/Tentacle/issues/events{/number}","events_url":"https://api.github.com/repos/mdiep/Tentacle/events","assignees_url":"https://api.github.com/repos/mdiep/Tentacle/assignees{/user}","branches_url":"https://api.github.com/repos/mdiep/Tentacle/branches{/branch}","tags_url":"https://api.github.com/repos/mdiep/Tentacle/tags","blobs_url":"https://api.github.com/repos/mdiep/Tentacle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdiep/Tentacle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdiep/Tentacle/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdiep/Tentacle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdiep/Tentacle/statuses/{sha}","languages_url":"https://api.github.com/repos/mdiep/Tentacle/languages","stargazers_url":"https://api.github.com/repos/mdiep/Tentacle/stargazers","contributors_url":"https://api.github.com/repos/mdiep/Tentacle/contributors","subscribers_url":"https://api.github.com/repos/mdiep/Tentacle/subscribers","subscription_url":"https://api.github.com/repos/mdiep/Tentacle/subscription","commits_url":"https://api.github.com/repos/mdiep/Tentacle/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdiep/Tentacle/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdiep/Tentacle/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdiep/Tentacle/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdiep/Tentacle/contents/{+path}","compare_url":"https://api.github.com/repos/mdiep/Tentacle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdiep/Tentacle/merges","archive_url":"https://api.github.com/repos/mdiep/Tentacle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdiep/Tentacle/downloads","issues_url":"https://api.github.com/repos/mdiep/Tentacle/issues{/number}","pulls_url":"https://api.github.com/repos/mdiep/Tentacle/pulls{/number}","milestones_url":"https://api.github.com/repos/mdiep/Tentacle/milestones{/number}","notifications_url":"https://api.github.com/repos/mdiep/Tentacle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdiep/Tentacle/labels{/name}","releases_url":"https://api.github.com/repos/mdiep/Tentacle/releases{/id}","deployments_url":"https://api.github.com/repos/mdiep/Tentacle/deployments","created_at":"2016-03-03T19:20:49Z","updated_at":"2016-06-03T16:45:12Z","pushed_at":"2016-07-14T15:38:45Z","git_url":"git://github.com/mdiep/Tentacle.git","ssh_url":"git@github.com:mdiep/Tentacle.git","clone_url":"https://github.com/mdiep/Tentacle.git","svn_url":"https://github.com/mdiep/Tentacle","homepage":"","size":192,"stargazers_count":133,"watchers_count":133,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":3,"forks":11,"open_issues":3,"watchers":133,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mdiep/Tentacle/pulls/28"},"html":{"href":"https://github.com/mdiep/Tentacle/pull/28"},"issue":{"href":"https://api.github.com/repos/mdiep/Tentacle/issues/28"},"comments":{"href":"https://api.github.com/repos/mdiep/Tentacle/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/mdiep/Tentacle/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/mdiep/Tentacle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mdiep/Tentacle/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/mdiep/Tentacle/statuses/83fd80cbfde8c0dc064fae4dbfdbe78f792f5147"}}}}
{"actor":{"display_login":"mdiep"}}