{"action":"created","comment":{"url":"https://api.github.com/repos/rnystrom/GitHawk/pulls/comments/145250095","pull_request_review_id":70023638,"id":145250095,"diff_hunk":"@@ -14,3 +14,9 @@ public enum GithubAPI {\n     static let clientSecret = \"YOUR_CLIENT_SECRET\"\n \n }\n+\n+public enum ImgurAPI {\n+    \n+    static let clientID = \"<# Imgur API client ID #>\"","path":"Classes/Other/Secrets.swift","position":7,"original_position":7,"commit_id":"77ee3ff314671364c2ae66fd4451370829eeb664","original_commit_id":"77ee3ff314671364c2ae66fd4451370829eeb664","user":{"login":"Sherlouk","id":15193942,"avatar_url":"https://avatars2.githubusercontent.com/u/15193942?v=4","gravatar_id":"","url":"https://api.github.com/users/Sherlouk","html_url":"https://github.com/Sherlouk","followers_url":"https://api.github.com/users/Sherlouk/followers","following_url":"https://api.github.com/users/Sherlouk/following{/other_user}","gists_url":"https://api.github.com/users/Sherlouk/gists{/gist_id}","starred_url":"https://api.github.com/users/Sherlouk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sherlouk/subscriptions","organizations_url":"https://api.github.com/users/Sherlouk/orgs","repos_url":"https://api.github.com/users/Sherlouk/repos","events_url":"https://api.github.com/users/Sherlouk/events{/privacy}","received_events_url":"https://api.github.com/users/Sherlouk/received_events","type":"User","site_admin":false},"body":"Maybe 🤔 Today I learn","created_at":"2017-10-17T20:42:24Z","updated_at":"2017-10-17T20:42:24Z","html_url":"https://github.com/rnystrom/GitHawk/pull/475#discussion_r145250095","pull_request_url":"https://api.github.com/repos/rnystrom/GitHawk/pulls/475","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/rnystrom/GitHawk/pulls/comments/145250095"},"html":{"href":"https://github.com/rnystrom/GitHawk/pull/475#discussion_r145250095"},"pull_request":{"href":"https://api.github.com/repos/rnystrom/GitHawk/pulls/475"}},"in_reply_to_id":145223807},"pull_request":{"url":"https://api.github.com/repos/rnystrom/GitHawk/pulls/475","id":143993626,"html_url":"https://github.com/rnystrom/GitHawk/pull/475","diff_url":"https://github.com/rnystrom/GitHawk/pull/475.diff","patch_url":"https://github.com/rnystrom/GitHawk/pull/475.patch","issue_url":"https://api.github.com/repos/rnystrom/GitHawk/issues/475","number":475,"state":"open","locked":false,"title":"Image Upload for Bug Reports","user":{"login":"Sherlouk","id":15193942,"avatar_url":"https://avatars2.githubusercontent.com/u/15193942?v=4","gravatar_id":"","url":"https://api.github.com/users/Sherlouk","html_url":"https://github.com/Sherlouk","followers_url":"https://api.github.com/users/Sherlouk/followers","following_url":"https://api.github.com/users/Sherlouk/following{/other_user}","gists_url":"https://api.github.com/users/Sherlouk/gists{/gist_id}","starred_url":"https://api.github.com/users/Sherlouk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sherlouk/subscriptions","organizations_url":"https://api.github.com/users/Sherlouk/orgs","repos_url":"https://api.github.com/users/Sherlouk/repos","events_url":"https://api.github.com/users/Sherlouk/events{/privacy}","received_events_url":"https://api.github.com/users/Sherlouk/received_events","type":"User","site_admin":false},"body":"Basic version is setup now, when you click on the upload icon it'll take you to the picker. You click on the image, wait a couple seconds, and then it'll insert the markdown for you with the correct link.\r\n\r\nNeed to work on the UX/flow when a user taps on the image - Indicating that something is happening. Currently thinking to dismiss the picker view, and add a progress bar just under the navigation bar which goes across while all the background work is happening? Not sure though as the cursor could move in that time...\r\n\r\nOpen for suggestions on that front\r\n\r\nI've also got the networking stuff ready for ensuring rate limits are not exceeded, but this isn't wired up yet. I think this'll come just before I do the upload step, but after the user has selected the image. That way it'll be the most accurate information! Purpose for this step is to prevent us from ever using 100% of our rate limit, as if we do this 5 times in a month then Imgur will not give us any more allowance for the rest of the month - I'd rather have an error saying \"No more uploads today\" than \"No more uploads this month\". Regardless I don't think we'll reach our limits, but this will be monitored and we can see how it goes! Better to be safe.\r\n\r\nAnother decision to be had is the text that get's associated with the image. We can provided a Name, Title and Description as well as the text that goes with the markdown (though I'm currently using the same value as the name). We can provide nothing for all these values, but up to us really.\r\n\r\nI've also got pretty harsh compression on at the moment (0.2). I've tried it at 0.5 and it does still work, but using PNG representation was exceeding file size limits (granted the default images are super high-res, but got to account for these situations!). If people think the quality of image is *too* bad we can up the number until a point where we're all happy.","created_at":"2017-09-29T22:33:59Z","updated_at":"2017-10-17T20:42:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29b5604855526d681c8f76c93a355292c5ba9966","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/rnystrom/GitHawk/pulls/475/commits","review_comments_url":"https://api.github.com/repos/rnystrom/GitHawk/pulls/475/comments","review_comment_url":"https://api.github.com/repos/rnystrom/GitHawk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rnystrom/GitHawk/issues/475/comments","statuses_url":"https://api.github.com/repos/rnystrom/GitHawk/statuses/77ee3ff314671364c2ae66fd4451370829eeb664","head":{"label":"rnystrom:uploadImage","ref":"uploadImage","sha":"77ee3ff314671364c2ae66fd4451370829eeb664","user":{"login":"rnystrom","id":739696,"avatar_url":"https://avatars2.githubusercontent.com/u/739696?v=4","gravatar_id":"","url":"https://api.github.com/users/rnystrom","html_url":"https://github.com/rnystrom","followers_url":"https://api.github.com/users/rnystrom/followers","following_url":"https://api.github.com/users/rnystrom/following{/other_user}","gists_url":"https://api.github.com/users/rnystrom/gists{/gist_id}","starred_url":"https://api.github.com/users/rnystrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnystrom/subscriptions","organizations_url":"https://api.github.com/users/rnystrom/orgs","repos_url":"https://api.github.com/users/rnystrom/repos","events_url":"https://api.github.com/users/rnystrom/events{/privacy}","received_events_url":"https://api.github.com/users/rnystrom/received_events","type":"User","site_admin":false},"repo":{"id":89921801,"name":"GitHawk","full_name":"rnystrom/GitHawk","owner":{"login":"rnystrom","id":739696,"avatar_url":"https://avatars2.githubusercontent.com/u/739696?v=4","gravatar_id":"","url":"https://api.github.com/users/rnystrom","html_url":"https://github.com/rnystrom","followers_url":"https://api.github.com/users/rnystrom/followers","following_url":"https://api.github.com/users/rnystrom/following{/other_user}","gists_url":"https://api.github.com/users/rnystrom/gists{/gist_id}","starred_url":"https://api.github.com/users/rnystrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnystrom/subscriptions","organizations_url":"https://api.github.com/users/rnystrom/orgs","repos_url":"https://api.github.com/users/rnystrom/repos","events_url":"https://api.github.com/users/rnystrom/events{/privacy}","received_events_url":"https://api.github.com/users/rnystrom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rnystrom/GitHawk","description":"A GitHub project manager app for iOS.","fork":false,"url":"https://api.github.com/repos/rnystrom/GitHawk","forks_url":"https://api.github.com/repos/rnystrom/GitHawk/forks","keys_url":"https://api.github.com/repos/rnystrom/GitHawk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rnystrom/GitHawk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rnystrom/GitHawk/teams","hooks_url":"https://api.github.com/repos/rnystrom/GitHawk/hooks","issue_events_url":"https://api.github.com/repos/rnystrom/GitHawk/issues/events{/number}","events_url":"https://api.github.com/repos/rnystrom/GitHawk/events","assignees_url":"https://api.github.com/repos/rnystrom/GitHawk/assignees{/user}","branches_url":"https://api.github.com/repos/rnystrom/GitHawk/branches{/branch}","tags_url":"https://api.github.com/repos/rnystrom/GitHawk/tags","blobs_url":"https://api.github.com/repos/rnystrom/GitHawk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rnystrom/GitHawk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rnystrom/GitHawk/git/refs{/sha}","trees_url":"https://api.github.com/repos/rnystrom/GitHawk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rnystrom/GitHawk/statuses/{sha}","languages_url":"https://api.github.com/repos/rnystrom/GitHawk/languages","stargazers_url":"https://api.github.com/repos/rnystrom/GitHawk/stargazers","contributors_url":"https://api.github.com/repos/rnystrom/GitHawk/contributors","subscribers_url":"https://api.github.com/repos/rnystrom/GitHawk/subscribers","subscription_url":"https://api.github.com/repos/rnystrom/GitHawk/subscription","commits_url":"https://api.github.com/repos/rnystrom/GitHawk/commits{/sha}","git_commits_url":"https://api.github.com/repos/rnystrom/GitHawk/git/commits{/sha}","comments_url":"https://api.github.com/repos/rnystrom/GitHawk/comments{/number}","issue_comment_url":"https://api.github.com/repos/rnystrom/GitHawk/issues/comments{/number}","contents_url":"https://api.github.com/repos/rnystrom/GitHawk/contents/{+path}","compare_url":"https://api.github.com/repos/rnystrom/GitHawk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rnystrom/GitHawk/merges","archive_url":"https://api.github.com/repos/rnystrom/GitHawk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rnystrom/GitHawk/downloads","issues_url":"https://api.github.com/repos/rnystrom/GitHawk/issues{/number}","pulls_url":"https://api.github.com/repos/rnystrom/GitHawk/pulls{/number}","milestones_url":"https://api.github.com/repos/rnystrom/GitHawk/milestones{/number}","notifications_url":"https://api.github.com/repos/rnystrom/GitHawk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rnystrom/GitHawk/labels{/name}","releases_url":"https://api.github.com/repos/rnystrom/GitHawk/releases{/id}","deployments_url":"https://api.github.com/repos/rnystrom/GitHawk/deployments","created_at":"2017-05-01T12:21:48Z","updated_at":"2017-10-17T18:57:10Z","pushed_at":"2017-10-17T15:26:11Z","git_url":"git://github.com/rnystrom/GitHawk.git","ssh_url":"git@github.com:rnystrom/GitHawk.git","clone_url":"https://github.com/rnystrom/GitHawk.git","svn_url":"https://github.com/rnystrom/GitHawk","homepage":"http://githawk.com","size":67230,"stargazers_count":375,"watchers_count":375,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":47,"mirror_url":null,"open_issues_count":174,"forks":47,"open_issues":174,"watchers":375,"default_branch":"master"}},"base":{"label":"rnystrom:master","ref":"master","sha":"34ebd869ad112b7044c632a862c342c9e9e1fe88","user":{"login":"rnystrom","id":739696,"avatar_url":"https://avatars2.githubusercontent.com/u/739696?v=4","gravatar_id":"","url":"https://api.github.com/users/rnystrom","html_url":"https://github.com/rnystrom","followers_url":"https://api.github.com/users/rnystrom/followers","following_url":"https://api.github.com/users/rnystrom/following{/other_user}","gists_url":"https://api.github.com/users/rnystrom/gists{/gist_id}","starred_url":"https://api.github.com/users/rnystrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnystrom/subscriptions","organizations_url":"https://api.github.com/users/rnystrom/orgs","repos_url":"https://api.github.com/users/rnystrom/repos","events_url":"https://api.github.com/users/rnystrom/events{/privacy}","received_events_url":"https://api.github.com/users/rnystrom/received_events","type":"User","site_admin":false},"repo":{"id":89921801,"name":"GitHawk","full_name":"rnystrom/GitHawk","owner":{"login":"rnystrom","id":739696,"avatar_url":"https://avatars2.githubusercontent.com/u/739696?v=4","gravatar_id":"","url":"https://api.github.com/users/rnystrom","html_url":"https://github.com/rnystrom","followers_url":"https://api.github.com/users/rnystrom/followers","following_url":"https://api.github.com/users/rnystrom/following{/other_user}","gists_url":"https://api.github.com/users/rnystrom/gists{/gist_id}","starred_url":"https://api.github.com/users/rnystrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnystrom/subscriptions","organizations_url":"https://api.github.com/users/rnystrom/orgs","repos_url":"https://api.github.com/users/rnystrom/repos","events_url":"https://api.github.com/users/rnystrom/events{/privacy}","received_events_url":"https://api.github.com/users/rnystrom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rnystrom/GitHawk","description":"A GitHub project manager app for iOS.","fork":false,"url":"https://api.github.com/repos/rnystrom/GitHawk","forks_url":"https://api.github.com/repos/rnystrom/GitHawk/forks","keys_url":"https://api.github.com/repos/rnystrom/GitHawk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rnystrom/GitHawk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rnystrom/GitHawk/teams","hooks_url":"https://api.github.com/repos/rnystrom/GitHawk/hooks","issue_events_url":"https://api.github.com/repos/rnystrom/GitHawk/issues/events{/number}","events_url":"https://api.github.com/repos/rnystrom/GitHawk/events","assignees_url":"https://api.github.com/repos/rnystrom/GitHawk/assignees{/user}","branches_url":"https://api.github.com/repos/rnystrom/GitHawk/branches{/branch}","tags_url":"https://api.github.com/repos/rnystrom/GitHawk/tags","blobs_url":"https://api.github.com/repos/rnystrom/GitHawk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rnystrom/GitHawk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rnystrom/GitHawk/git/refs{/sha}","trees_url":"https://api.github.com/repos/rnystrom/GitHawk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rnystrom/GitHawk/statuses/{sha}","languages_url":"https://api.github.com/repos/rnystrom/GitHawk/languages","stargazers_url":"https://api.github.com/repos/rnystrom/GitHawk/stargazers","contributors_url":"https://api.github.com/repos/rnystrom/GitHawk/contributors","subscribers_url":"https://api.github.com/repos/rnystrom/GitHawk/subscribers","subscription_url":"https://api.github.com/repos/rnystrom/GitHawk/subscription","commits_url":"https://api.github.com/repos/rnystrom/GitHawk/commits{/sha}","git_commits_url":"https://api.github.com/repos/rnystrom/GitHawk/git/commits{/sha}","comments_url":"https://api.github.com/repos/rnystrom/GitHawk/comments{/number}","issue_comment_url":"https://api.github.com/repos/rnystrom/GitHawk/issues/comments{/number}","contents_url":"https://api.github.com/repos/rnystrom/GitHawk/contents/{+path}","compare_url":"https://api.github.com/repos/rnystrom/GitHawk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rnystrom/GitHawk/merges","archive_url":"https://api.github.com/repos/rnystrom/GitHawk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rnystrom/GitHawk/downloads","issues_url":"https://api.github.com/repos/rnystrom/GitHawk/issues{/number}","pulls_url":"https://api.github.com/repos/rnystrom/GitHawk/pulls{/number}","milestones_url":"https://api.github.com/repos/rnystrom/GitHawk/milestones{/number}","notifications_url":"https://api.github.com/repos/rnystrom/GitHawk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rnystrom/GitHawk/labels{/name}","releases_url":"https://api.github.com/repos/rnystrom/GitHawk/releases{/id}","deployments_url":"https://api.github.com/repos/rnystrom/GitHawk/deployments","created_at":"2017-05-01T12:21:48Z","updated_at":"2017-10-17T18:57:10Z","pushed_at":"2017-10-17T15:26:11Z","git_url":"git://github.com/rnystrom/GitHawk.git","ssh_url":"git@github.com:rnystrom/GitHawk.git","clone_url":"https://github.com/rnystrom/GitHawk.git","svn_url":"https://github.com/rnystrom/GitHawk","homepage":"http://githawk.com","size":67230,"stargazers_count":375,"watchers_count":375,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":47,"mirror_url":null,"open_issues_count":174,"forks":47,"open_issues":174,"watchers":375,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rnystrom/GitHawk/pulls/475"},"html":{"href":"https://github.com/rnystrom/GitHawk/pull/475"},"issue":{"href":"https://api.github.com/repos/rnystrom/GitHawk/issues/475"},"comments":{"href":"https://api.github.com/repos/rnystrom/GitHawk/issues/475/comments"},"review_comments":{"href":"https://api.github.com/repos/rnystrom/GitHawk/pulls/475/comments"},"review_comment":{"href":"https://api.github.com/repos/rnystrom/GitHawk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rnystrom/GitHawk/pulls/475/commits"},"statuses":{"href":"https://api.github.com/repos/rnystrom/GitHawk/statuses/77ee3ff314671364c2ae66fd4451370829eeb664"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Sherlouk"}}