{"action":"created","comment":{"url":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/comments/58526924","id":58526924,"diff_hunk":"@@ -0,0 +1,39 @@\n+﻿module Actions \n+    open System\n+    open System.Net\n+    open Newtonsoft.Json\n+    open Cards\n+\n+    type ActionData = \n+        { Text : string }\n+\n+    type MemberCreator = \n+        { Id : string\n+          FullName : string\n+          Username : string}\n+\n+    type BasicAction = \n+        { Id : string\n+          Data : ActionData\n+          Type : string\n+          MemberCreator : MemberCreator\n+          }\n+\n+    type RawCardAndActions = \n+        { Card : RawTrelloCard \n+          Actions : BasicAction [] }\n+\n+    //NOTE: Currently assuming that card will have less than 1000 actions. If a card has more than that, we need to deal with the trello paging to get them all\n+    let getCardCommentActionsAsync trelloCred (rawCard : RawTrelloCard) = \n+        async {\n+            let uri = Uri(sprintf \"https://api.trello.com/1/cards/%s/actions?filter=commentCard&key=%s&token=%s\" rawCard.Card.Id trelloCred.Key trelloCred.Token)\n+            use webClient = new WebClient()\n+            let! rawCommentActions = webClient.AsyncDownloadString(uri)\n+            let basicCommentActions = JsonConvert.DeserializeObject<BasicAction []>(rawCommentActions)","path":"TrelloSync/TrelloSync/Actions.fs","position":32,"original_position":32,"commit_id":"c7d7a98bf781c57d3f546b4b87a352c3d3aaa3d2","original_commit_id":"c7d7a98bf781c57d3f546b4b87a352c3d3aaa3d2","user":{"login":"jebbinSCL","id":11422633,"avatar_url":"https://avatars.githubusercontent.com/u/11422633?v=3","gravatar_id":"","url":"https://api.github.com/users/jebbinSCL","html_url":"https://github.com/jebbinSCL","followers_url":"https://api.github.com/users/jebbinSCL/followers","following_url":"https://api.github.com/users/jebbinSCL/following{/other_user}","gists_url":"https://api.github.com/users/jebbinSCL/gists{/gist_id}","starred_url":"https://api.github.com/users/jebbinSCL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jebbinSCL/subscriptions","organizations_url":"https://api.github.com/users/jebbinSCL/orgs","repos_url":"https://api.github.com/users/jebbinSCL/repos","events_url":"https://api.github.com/users/jebbinSCL/events{/privacy}","received_events_url":"https://api.github.com/users/jebbinSCL/received_events","type":"User","site_admin":false},"body":"Yes, but they require a url that is available at compile time. Since we want to supply credentials from, and we need to add in the id for most of the urls we are using, we can't use them. ","created_at":"2016-04-05T12:14:09Z","updated_at":"2016-04-05T12:14:09Z","html_url":"https://github.com/BristechSRM/infrastructure/pull/24#discussion_r58526924","pull_request_url":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/comments/58526924"},"html":{"href":"https://github.com/BristechSRM/infrastructure/pull/24#discussion_r58526924"},"pull_request":{"href":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/24","id":65161561,"html_url":"https://github.com/BristechSRM/infrastructure/pull/24","diff_url":"https://github.com/BristechSRM/infrastructure/pull/24.diff","patch_url":"https://github.com/BristechSRM/infrastructure/pull/24.patch","issue_url":"https://api.github.com/repos/BristechSRM/infrastructure/issues/24","number":24,"state":"open","locked":false,"title":"Trello sync : Part 1","user":{"login":"jebbinSCL","id":11422633,"avatar_url":"https://avatars.githubusercontent.com/u/11422633?v=3","gravatar_id":"","url":"https://api.github.com/users/jebbinSCL","html_url":"https://github.com/jebbinSCL","followers_url":"https://api.github.com/users/jebbinSCL/followers","following_url":"https://api.github.com/users/jebbinSCL/following{/other_user}","gists_url":"https://api.github.com/users/jebbinSCL/gists{/gist_id}","starred_url":"https://api.github.com/users/jebbinSCL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jebbinSCL/subscriptions","organizations_url":"https://api.github.com/users/jebbinSCL/orgs","repos_url":"https://api.github.com/users/jebbinSCL/repos","events_url":"https://api.github.com/users/jebbinSCL/events{/privacy}","received_events_url":"https://api.github.com/users/jebbinSCL/received_events","type":"User","site_admin":false},"body":"First stage of new Trello Sync\r\nReads from trello api, performs parsing and writes to json file. \r\n\r\nNext stage will be db / api connections. \r\n\r\n","created_at":"2016-04-04T15:12:12Z","updated_at":"2016-04-05T12:14:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3a6e1c1e8cd527f801ac16df7f6d8d7170484a0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/24/commits","review_comments_url":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/24/comments","review_comment_url":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BristechSRM/infrastructure/issues/24/comments","statuses_url":"https://api.github.com/repos/BristechSRM/infrastructure/statuses/c7d7a98bf781c57d3f546b4b87a352c3d3aaa3d2","head":{"label":"BristechSRM:TrelloSync","ref":"TrelloSync","sha":"c7d7a98bf781c57d3f546b4b87a352c3d3aaa3d2","user":{"login":"BristechSRM","id":17645943,"avatar_url":"https://avatars.githubusercontent.com/u/17645943?v=3","gravatar_id":"","url":"https://api.github.com/users/BristechSRM","html_url":"https://github.com/BristechSRM","followers_url":"https://api.github.com/users/BristechSRM/followers","following_url":"https://api.github.com/users/BristechSRM/following{/other_user}","gists_url":"https://api.github.com/users/BristechSRM/gists{/gist_id}","starred_url":"https://api.github.com/users/BristechSRM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BristechSRM/subscriptions","organizations_url":"https://api.github.com/users/BristechSRM/orgs","repos_url":"https://api.github.com/users/BristechSRM/repos","events_url":"https://api.github.com/users/BristechSRM/events{/privacy}","received_events_url":"https://api.github.com/users/BristechSRM/received_events","type":"Organization","site_admin":false},"repo":{"id":53149095,"name":"infrastructure","full_name":"BristechSRM/infrastructure","owner":{"login":"BristechSRM","id":17645943,"avatar_url":"https://avatars.githubusercontent.com/u/17645943?v=3","gravatar_id":"","url":"https://api.github.com/users/BristechSRM","html_url":"https://github.com/BristechSRM","followers_url":"https://api.github.com/users/BristechSRM/followers","following_url":"https://api.github.com/users/BristechSRM/following{/other_user}","gists_url":"https://api.github.com/users/BristechSRM/gists{/gist_id}","starred_url":"https://api.github.com/users/BristechSRM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BristechSRM/subscriptions","organizations_url":"https://api.github.com/users/BristechSRM/orgs","repos_url":"https://api.github.com/users/BristechSRM/repos","events_url":"https://api.github.com/users/BristechSRM/events{/privacy}","received_events_url":"https://api.github.com/users/BristechSRM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BristechSRM/infrastructure","description":"Templates and scripts","fork":false,"url":"https://api.github.com/repos/BristechSRM/infrastructure","forks_url":"https://api.github.com/repos/BristechSRM/infrastructure/forks","keys_url":"https://api.github.com/repos/BristechSRM/infrastructure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BristechSRM/infrastructure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BristechSRM/infrastructure/teams","hooks_url":"https://api.github.com/repos/BristechSRM/infrastructure/hooks","issue_events_url":"https://api.github.com/repos/BristechSRM/infrastructure/issues/events{/number}","events_url":"https://api.github.com/repos/BristechSRM/infrastructure/events","assignees_url":"https://api.github.com/repos/BristechSRM/infrastructure/assignees{/user}","branches_url":"https://api.github.com/repos/BristechSRM/infrastructure/branches{/branch}","tags_url":"https://api.github.com/repos/BristechSRM/infrastructure/tags","blobs_url":"https://api.github.com/repos/BristechSRM/infrastructure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BristechSRM/infrastructure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BristechSRM/infrastructure/git/refs{/sha}","trees_url":"https://api.github.com/repos/BristechSRM/infrastructure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BristechSRM/infrastructure/statuses/{sha}","languages_url":"https://api.github.com/repos/BristechSRM/infrastructure/languages","stargazers_url":"https://api.github.com/repos/BristechSRM/infrastructure/stargazers","contributors_url":"https://api.github.com/repos/BristechSRM/infrastructure/contributors","subscribers_url":"https://api.github.com/repos/BristechSRM/infrastructure/subscribers","subscription_url":"https://api.github.com/repos/BristechSRM/infrastructure/subscription","commits_url":"https://api.github.com/repos/BristechSRM/infrastructure/commits{/sha}","git_commits_url":"https://api.github.com/repos/BristechSRM/infrastructure/git/commits{/sha}","comments_url":"https://api.github.com/repos/BristechSRM/infrastructure/comments{/number}","issue_comment_url":"https://api.github.com/repos/BristechSRM/infrastructure/issues/comments{/number}","contents_url":"https://api.github.com/repos/BristechSRM/infrastructure/contents/{+path}","compare_url":"https://api.github.com/repos/BristechSRM/infrastructure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BristechSRM/infrastructure/merges","archive_url":"https://api.github.com/repos/BristechSRM/infrastructure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BristechSRM/infrastructure/downloads","issues_url":"https://api.github.com/repos/BristechSRM/infrastructure/issues{/number}","pulls_url":"https://api.github.com/repos/BristechSRM/infrastructure/pulls{/number}","milestones_url":"https://api.github.com/repos/BristechSRM/infrastructure/milestones{/number}","notifications_url":"https://api.github.com/repos/BristechSRM/infrastructure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BristechSRM/infrastructure/labels{/name}","releases_url":"https://api.github.com/repos/BristechSRM/infrastructure/releases{/id}","deployments_url":"https://api.github.com/repos/BristechSRM/infrastructure/deployments","created_at":"2016-03-04T16:28:43Z","updated_at":"2016-03-31T14:56:14Z","pushed_at":"2016-04-05T11:30:56Z","git_url":"git://github.com/BristechSRM/infrastructure.git","ssh_url":"git@github.com:BristechSRM/infrastructure.git","clone_url":"https://github.com/BristechSRM/infrastructure.git","svn_url":"https://github.com/BristechSRM/infrastructure","homepage":null,"size":276,"stargazers_count":0,"watchers_count":0,"language":"F#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"BristechSRM:master","ref":"master","sha":"6ad71f6f1fe5f7f275953b9309ea4b72e228afa8","user":{"login":"BristechSRM","id":17645943,"avatar_url":"https://avatars.githubusercontent.com/u/17645943?v=3","gravatar_id":"","url":"https://api.github.com/users/BristechSRM","html_url":"https://github.com/BristechSRM","followers_url":"https://api.github.com/users/BristechSRM/followers","following_url":"https://api.github.com/users/BristechSRM/following{/other_user}","gists_url":"https://api.github.com/users/BristechSRM/gists{/gist_id}","starred_url":"https://api.github.com/users/BristechSRM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BristechSRM/subscriptions","organizations_url":"https://api.github.com/users/BristechSRM/orgs","repos_url":"https://api.github.com/users/BristechSRM/repos","events_url":"https://api.github.com/users/BristechSRM/events{/privacy}","received_events_url":"https://api.github.com/users/BristechSRM/received_events","type":"Organization","site_admin":false},"repo":{"id":53149095,"name":"infrastructure","full_name":"BristechSRM/infrastructure","owner":{"login":"BristechSRM","id":17645943,"avatar_url":"https://avatars.githubusercontent.com/u/17645943?v=3","gravatar_id":"","url":"https://api.github.com/users/BristechSRM","html_url":"https://github.com/BristechSRM","followers_url":"https://api.github.com/users/BristechSRM/followers","following_url":"https://api.github.com/users/BristechSRM/following{/other_user}","gists_url":"https://api.github.com/users/BristechSRM/gists{/gist_id}","starred_url":"https://api.github.com/users/BristechSRM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BristechSRM/subscriptions","organizations_url":"https://api.github.com/users/BristechSRM/orgs","repos_url":"https://api.github.com/users/BristechSRM/repos","events_url":"https://api.github.com/users/BristechSRM/events{/privacy}","received_events_url":"https://api.github.com/users/BristechSRM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BristechSRM/infrastructure","description":"Templates and scripts","fork":false,"url":"https://api.github.com/repos/BristechSRM/infrastructure","forks_url":"https://api.github.com/repos/BristechSRM/infrastructure/forks","keys_url":"https://api.github.com/repos/BristechSRM/infrastructure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BristechSRM/infrastructure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BristechSRM/infrastructure/teams","hooks_url":"https://api.github.com/repos/BristechSRM/infrastructure/hooks","issue_events_url":"https://api.github.com/repos/BristechSRM/infrastructure/issues/events{/number}","events_url":"https://api.github.com/repos/BristechSRM/infrastructure/events","assignees_url":"https://api.github.com/repos/BristechSRM/infrastructure/assignees{/user}","branches_url":"https://api.github.com/repos/BristechSRM/infrastructure/branches{/branch}","tags_url":"https://api.github.com/repos/BristechSRM/infrastructure/tags","blobs_url":"https://api.github.com/repos/BristechSRM/infrastructure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BristechSRM/infrastructure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BristechSRM/infrastructure/git/refs{/sha}","trees_url":"https://api.github.com/repos/BristechSRM/infrastructure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BristechSRM/infrastructure/statuses/{sha}","languages_url":"https://api.github.com/repos/BristechSRM/infrastructure/languages","stargazers_url":"https://api.github.com/repos/BristechSRM/infrastructure/stargazers","contributors_url":"https://api.github.com/repos/BristechSRM/infrastructure/contributors","subscribers_url":"https://api.github.com/repos/BristechSRM/infrastructure/subscribers","subscription_url":"https://api.github.com/repos/BristechSRM/infrastructure/subscription","commits_url":"https://api.github.com/repos/BristechSRM/infrastructure/commits{/sha}","git_commits_url":"https://api.github.com/repos/BristechSRM/infrastructure/git/commits{/sha}","comments_url":"https://api.github.com/repos/BristechSRM/infrastructure/comments{/number}","issue_comment_url":"https://api.github.com/repos/BristechSRM/infrastructure/issues/comments{/number}","contents_url":"https://api.github.com/repos/BristechSRM/infrastructure/contents/{+path}","compare_url":"https://api.github.com/repos/BristechSRM/infrastructure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BristechSRM/infrastructure/merges","archive_url":"https://api.github.com/repos/BristechSRM/infrastructure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BristechSRM/infrastructure/downloads","issues_url":"https://api.github.com/repos/BristechSRM/infrastructure/issues{/number}","pulls_url":"https://api.github.com/repos/BristechSRM/infrastructure/pulls{/number}","milestones_url":"https://api.github.com/repos/BristechSRM/infrastructure/milestones{/number}","notifications_url":"https://api.github.com/repos/BristechSRM/infrastructure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BristechSRM/infrastructure/labels{/name}","releases_url":"https://api.github.com/repos/BristechSRM/infrastructure/releases{/id}","deployments_url":"https://api.github.com/repos/BristechSRM/infrastructure/deployments","created_at":"2016-03-04T16:28:43Z","updated_at":"2016-03-31T14:56:14Z","pushed_at":"2016-04-05T11:30:56Z","git_url":"git://github.com/BristechSRM/infrastructure.git","ssh_url":"git@github.com:BristechSRM/infrastructure.git","clone_url":"https://github.com/BristechSRM/infrastructure.git","svn_url":"https://github.com/BristechSRM/infrastructure","homepage":null,"size":276,"stargazers_count":0,"watchers_count":0,"language":"F#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/24"},"html":{"href":"https://github.com/BristechSRM/infrastructure/pull/24"},"issue":{"href":"https://api.github.com/repos/BristechSRM/infrastructure/issues/24"},"comments":{"href":"https://api.github.com/repos/BristechSRM/infrastructure/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BristechSRM/infrastructure/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/BristechSRM/infrastructure/statuses/c7d7a98bf781c57d3f546b4b87a352c3d3aaa3d2"}}}}