{"action":"closed","number":15,"pull_request":{"url":"https://api.github.com/repos/18F/bpa-trello/pulls/15","id":61332687,"html_url":"https://github.com/18F/bpa-trello/pull/15","diff_url":"https://github.com/18F/bpa-trello/pull/15.diff","patch_url":"https://github.com/18F/bpa-trello/pull/15.patch","issue_url":"https://api.github.com/repos/18F/bpa-trello/issues/15","number":15,"state":"closed","locked":false,"title":"Stage manager tests and fixes","user":{"login":"mgwalker","id":1775733,"avatar_url":"https://avatars.githubusercontent.com/u/1775733?v=3","gravatar_id":"","url":"https://api.github.com/users/mgwalker","html_url":"https://github.com/mgwalker","followers_url":"https://api.github.com/users/mgwalker/followers","following_url":"https://api.github.com/users/mgwalker/following{/other_user}","gists_url":"https://api.github.com/users/mgwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/mgwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgwalker/subscriptions","organizations_url":"https://api.github.com/users/mgwalker/orgs","repos_url":"https://api.github.com/users/mgwalker/repos","events_url":"https://api.github.com/users/mgwalker/events{/privacy}","received_events_url":"https://api.github.com/users/mgwalker/received_events","type":"User","site_admin":false},"body":"Adds some tests to the stage manager and some fixes (described below)\r\n\r\n## Test notes\r\nSome of the code can't be well-tested because of the way errors are handled in the asynchronous code.  Restructuring to use promises everywhere would allow us to attach a `.catch()` or `.fail()` handler to check for proper behavior in error conditions.\r\n\r\n## Code changes\r\n* Made `makeAdditionalLists` promisified.  The promise it returns will reject if any of the lists fail to create, and will resolve after all lists have successfully been created.\r\n* The `getListCards` method was not receiving a list ID, so I added another argument for that.  Also updated `closeUnusedStages` to pass that list ID in.\r\n* Made `orderLists` order lists absolutely, instead of based on where its stage is in the list of stages.  That is, if there are stages A, B, C, D, and E, but there are only lists for A, D, and E, the lists will be ordered A-1, D=2, E=3, instead of A=1,D=4,E=5.  ***This isn't a bug and I meant to ask you about it before I committed it, but then I committed it and forgot to ask you about it first.  If you don't like this behavior, I'll revert it back, and I promise to try to do better about communicating!***\r\n* Changed the `addComment` test in `test-card-recorder` to mock the node-trello POST method instead of GET.  The result was an invalid ID being passed into the node-trello method which was causing some kind of weird asynchronous exception.  Unrelated tests were randomly appearing to fail.","created_at":"2016-03-02T00:25:50Z","updated_at":"2016-03-02T16:32:27Z","closed_at":"2016-03-02T16:32:27Z","merged_at":"2016-03-02T16:32:27Z","merge_commit_sha":"c9cb589825d6c008d3b238ce5119602b6b5c003d","assignee":{"login":"lauraGgit","id":5840989,"avatar_url":"https://avatars.githubusercontent.com/u/5840989?v=3","gravatar_id":"","url":"https://api.github.com/users/lauraGgit","html_url":"https://github.com/lauraGgit","followers_url":"https://api.github.com/users/lauraGgit/followers","following_url":"https://api.github.com/users/lauraGgit/following{/other_user}","gists_url":"https://api.github.com/users/lauraGgit/gists{/gist_id}","starred_url":"https://api.github.com/users/lauraGgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauraGgit/subscriptions","organizations_url":"https://api.github.com/users/lauraGgit/orgs","repos_url":"https://api.github.com/users/lauraGgit/repos","events_url":"https://api.github.com/users/lauraGgit/events{/privacy}","received_events_url":"https://api.github.com/users/lauraGgit/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/18F/bpa-trello/pulls/15/commits","review_comments_url":"https://api.github.com/repos/18F/bpa-trello/pulls/15/comments","review_comment_url":"https://api.github.com/repos/18F/bpa-trello/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/bpa-trello/issues/15/comments","statuses_url":"https://api.github.com/repos/18F/bpa-trello/statuses/3349223cde707c148f6168569da0ee324d524907","head":{"label":"18F:feature/stagemanager-tests","ref":"feature/stagemanager-tests","sha":"3349223cde707c148f6168569da0ee324d524907","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":51173859,"name":"bpa-trello","full_name":"18F/bpa-trello","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/bpa-trello","description":"","fork":false,"url":"https://api.github.com/repos/18F/bpa-trello","forks_url":"https://api.github.com/repos/18F/bpa-trello/forks","keys_url":"https://api.github.com/repos/18F/bpa-trello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/bpa-trello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/bpa-trello/teams","hooks_url":"https://api.github.com/repos/18F/bpa-trello/hooks","issue_events_url":"https://api.github.com/repos/18F/bpa-trello/issues/events{/number}","events_url":"https://api.github.com/repos/18F/bpa-trello/events","assignees_url":"https://api.github.com/repos/18F/bpa-trello/assignees{/user}","branches_url":"https://api.github.com/repos/18F/bpa-trello/branches{/branch}","tags_url":"https://api.github.com/repos/18F/bpa-trello/tags","blobs_url":"https://api.github.com/repos/18F/bpa-trello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/bpa-trello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/bpa-trello/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/bpa-trello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/bpa-trello/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/bpa-trello/languages","stargazers_url":"https://api.github.com/repos/18F/bpa-trello/stargazers","contributors_url":"https://api.github.com/repos/18F/bpa-trello/contributors","subscribers_url":"https://api.github.com/repos/18F/bpa-trello/subscribers","subscription_url":"https://api.github.com/repos/18F/bpa-trello/subscription","commits_url":"https://api.github.com/repos/18F/bpa-trello/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/bpa-trello/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/bpa-trello/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/bpa-trello/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/bpa-trello/contents/{+path}","compare_url":"https://api.github.com/repos/18F/bpa-trello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/bpa-trello/merges","archive_url":"https://api.github.com/repos/18F/bpa-trello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/bpa-trello/downloads","issues_url":"https://api.github.com/repos/18F/bpa-trello/issues{/number}","pulls_url":"https://api.github.com/repos/18F/bpa-trello/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/bpa-trello/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/bpa-trello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/bpa-trello/labels{/name}","releases_url":"https://api.github.com/repos/18F/bpa-trello/releases{/id}","deployments_url":"https://api.github.com/repos/18F/bpa-trello/deployments","created_at":"2016-02-05T21:03:41Z","updated_at":"2016-02-24T22:48:08Z","pushed_at":"2016-03-02T16:32:27Z","git_url":"git://github.com/18F/bpa-trello.git","ssh_url":"git@github.com:18F/bpa-trello.git","clone_url":"https://github.com/18F/bpa-trello.git","svn_url":"https://github.com/18F/bpa-trello","homepage":null,"size":89,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"18F:develop","ref":"develop","sha":"74c27a43ad92de4e8620c2a5db52d395bf8c8b25","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":51173859,"name":"bpa-trello","full_name":"18F/bpa-trello","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/bpa-trello","description":"","fork":false,"url":"https://api.github.com/repos/18F/bpa-trello","forks_url":"https://api.github.com/repos/18F/bpa-trello/forks","keys_url":"https://api.github.com/repos/18F/bpa-trello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/bpa-trello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/bpa-trello/teams","hooks_url":"https://api.github.com/repos/18F/bpa-trello/hooks","issue_events_url":"https://api.github.com/repos/18F/bpa-trello/issues/events{/number}","events_url":"https://api.github.com/repos/18F/bpa-trello/events","assignees_url":"https://api.github.com/repos/18F/bpa-trello/assignees{/user}","branches_url":"https://api.github.com/repos/18F/bpa-trello/branches{/branch}","tags_url":"https://api.github.com/repos/18F/bpa-trello/tags","blobs_url":"https://api.github.com/repos/18F/bpa-trello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/bpa-trello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/bpa-trello/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/bpa-trello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/bpa-trello/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/bpa-trello/languages","stargazers_url":"https://api.github.com/repos/18F/bpa-trello/stargazers","contributors_url":"https://api.github.com/repos/18F/bpa-trello/contributors","subscribers_url":"https://api.github.com/repos/18F/bpa-trello/subscribers","subscription_url":"https://api.github.com/repos/18F/bpa-trello/subscription","commits_url":"https://api.github.com/repos/18F/bpa-trello/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/bpa-trello/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/bpa-trello/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/bpa-trello/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/bpa-trello/contents/{+path}","compare_url":"https://api.github.com/repos/18F/bpa-trello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/bpa-trello/merges","archive_url":"https://api.github.com/repos/18F/bpa-trello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/bpa-trello/downloads","issues_url":"https://api.github.com/repos/18F/bpa-trello/issues{/number}","pulls_url":"https://api.github.com/repos/18F/bpa-trello/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/bpa-trello/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/bpa-trello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/bpa-trello/labels{/name}","releases_url":"https://api.github.com/repos/18F/bpa-trello/releases{/id}","deployments_url":"https://api.github.com/repos/18F/bpa-trello/deployments","created_at":"2016-02-05T21:03:41Z","updated_at":"2016-02-24T22:48:08Z","pushed_at":"2016-03-02T16:32:27Z","git_url":"git://github.com/18F/bpa-trello.git","ssh_url":"git@github.com:18F/bpa-trello.git","clone_url":"https://github.com/18F/bpa-trello.git","svn_url":"https://github.com/18F/bpa-trello","homepage":null,"size":89,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/bpa-trello/pulls/15"},"html":{"href":"https://github.com/18F/bpa-trello/pull/15"},"issue":{"href":"https://api.github.com/repos/18F/bpa-trello/issues/15"},"comments":{"href":"https://api.github.com/repos/18F/bpa-trello/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/bpa-trello/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/bpa-trello/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/bpa-trello/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/18F/bpa-trello/statuses/3349223cde707c148f6168569da0ee324d524907"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"lauraGgit","id":5840989,"avatar_url":"https://avatars.githubusercontent.com/u/5840989?v=3","gravatar_id":"","url":"https://api.github.com/users/lauraGgit","html_url":"https://github.com/lauraGgit","followers_url":"https://api.github.com/users/lauraGgit/followers","following_url":"https://api.github.com/users/lauraGgit/following{/other_user}","gists_url":"https://api.github.com/users/lauraGgit/gists{/gist_id}","starred_url":"https://api.github.com/users/lauraGgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauraGgit/subscriptions","organizations_url":"https://api.github.com/users/lauraGgit/orgs","repos_url":"https://api.github.com/users/lauraGgit/repos","events_url":"https://api.github.com/users/lauraGgit/events{/privacy}","received_events_url":"https://api.github.com/users/lauraGgit/received_events","type":"User","site_admin":false},"comments":4,"review_comments":0,"commits":13,"additions":208,"deletions":57,"changed_files":4}}