{"action":"opened","number":1071,"pull_request":{"url":"https://api.github.com/repos/18F/cg-dashboard/pulls/1071","id":116883754,"html_url":"https://github.com/18F/cg-dashboard/pull/1071","diff_url":"https://github.com/18F/cg-dashboard/pull/1071.diff","patch_url":"https://github.com/18F/cg-dashboard/pull/1071.patch","issue_url":"https://api.github.com/repos/18F/cg-dashboard/issues/1071","number":1071,"state":"open","locked":false,"title":"Remove misleading `if`","user":{"login":"adborden","id":509703,"avatar_url":"https://avatars1.githubusercontent.com/u/509703?v=3","gravatar_id":"","url":"https://api.github.com/users/adborden","html_url":"https://github.com/adborden","followers_url":"https://api.github.com/users/adborden/followers","following_url":"https://api.github.com/users/adborden/following{/other_user}","gists_url":"https://api.github.com/users/adborden/gists{/gist_id}","starred_url":"https://api.github.com/users/adborden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adborden/subscriptions","organizations_url":"https://api.github.com/users/adborden/orgs","repos_url":"https://api.github.com/users/adborden/repos","events_url":"https://api.github.com/users/adborden/events{/privacy}","received_events_url":"https://api.github.com/users/adborden/received_events","type":"User","site_admin":false},"body":"`errors` is always an array. We want to update the state regardless of the\r\nchange in case form errors were fixed or new ones appeared.\r\n\r\nThis doesn't change the logic, even an empty array is truthy, so it just removes\r\nthe unnecessary `if`.\r\n\r\nThanks @cmc333333 for catching this.","created_at":"2017-04-20T23:16:49Z","updated_at":"2017-04-20T23:16:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/18F/cg-dashboard/pulls/1071/commits","review_comments_url":"https://api.github.com/repos/18F/cg-dashboard/pulls/1071/comments","review_comment_url":"https://api.github.com/repos/18F/cg-dashboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/cg-dashboard/issues/1071/comments","statuses_url":"https://api.github.com/repos/18F/cg-dashboard/statuses/8f58799bebf968d2e9dadcd6bc5ed5cbaabd6c65","head":{"label":"18F:ab/fix-errors","ref":"ab/fix-errors","sha":"8f58799bebf968d2e9dadcd6bc5ed5cbaabd6c65","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars3.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":39210774,"name":"cg-dashboard","full_name":"18F/cg-dashboard","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars3.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/cg-dashboard","description":"A web dashboard for managing Cloud Foundry Apps","fork":false,"url":"https://api.github.com/repos/18F/cg-dashboard","forks_url":"https://api.github.com/repos/18F/cg-dashboard/forks","keys_url":"https://api.github.com/repos/18F/cg-dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/cg-dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/cg-dashboard/teams","hooks_url":"https://api.github.com/repos/18F/cg-dashboard/hooks","issue_events_url":"https://api.github.com/repos/18F/cg-dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/18F/cg-dashboard/events","assignees_url":"https://api.github.com/repos/18F/cg-dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/18F/cg-dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/18F/cg-dashboard/tags","blobs_url":"https://api.github.com/repos/18F/cg-dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/cg-dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/cg-dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/cg-dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/cg-dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/cg-dashboard/languages","stargazers_url":"https://api.github.com/repos/18F/cg-dashboard/stargazers","contributors_url":"https://api.github.com/repos/18F/cg-dashboard/contributors","subscribers_url":"https://api.github.com/repos/18F/cg-dashboard/subscribers","subscription_url":"https://api.github.com/repos/18F/cg-dashboard/subscription","commits_url":"https://api.github.com/repos/18F/cg-dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/cg-dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/cg-dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/cg-dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/cg-dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/18F/cg-dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/cg-dashboard/merges","archive_url":"https://api.github.com/repos/18F/cg-dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/cg-dashboard/downloads","issues_url":"https://api.github.com/repos/18F/cg-dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/18F/cg-dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/cg-dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/cg-dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/cg-dashboard/labels{/name}","releases_url":"https://api.github.com/repos/18F/cg-dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/18F/cg-dashboard/deployments","created_at":"2015-07-16T17:27:45Z","updated_at":"2017-03-20T18:59:58Z","pushed_at":"2017-04-20T23:15:45Z","git_url":"git://github.com/18F/cg-dashboard.git","ssh_url":"git@github.com:18F/cg-dashboard.git","clone_url":"https://github.com/18F/cg-dashboard.git","svn_url":"https://github.com/18F/cg-dashboard","homepage":"https://dashboard.fr.cloud.gov","size":5053,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":95,"forks":11,"open_issues":95,"watchers":18,"default_branch":"master"}},"base":{"label":"18F:master","ref":"master","sha":"66ec78902daf0682e42710a415bb6afa147f8b91","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars3.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":39210774,"name":"cg-dashboard","full_name":"18F/cg-dashboard","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars3.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/cg-dashboard","description":"A web dashboard for managing Cloud Foundry Apps","fork":false,"url":"https://api.github.com/repos/18F/cg-dashboard","forks_url":"https://api.github.com/repos/18F/cg-dashboard/forks","keys_url":"https://api.github.com/repos/18F/cg-dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/cg-dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/cg-dashboard/teams","hooks_url":"https://api.github.com/repos/18F/cg-dashboard/hooks","issue_events_url":"https://api.github.com/repos/18F/cg-dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/18F/cg-dashboard/events","assignees_url":"https://api.github.com/repos/18F/cg-dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/18F/cg-dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/18F/cg-dashboard/tags","blobs_url":"https://api.github.com/repos/18F/cg-dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/cg-dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/cg-dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/cg-dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/cg-dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/cg-dashboard/languages","stargazers_url":"https://api.github.com/repos/18F/cg-dashboard/stargazers","contributors_url":"https://api.github.com/repos/18F/cg-dashboard/contributors","subscribers_url":"https://api.github.com/repos/18F/cg-dashboard/subscribers","subscription_url":"https://api.github.com/repos/18F/cg-dashboard/subscription","commits_url":"https://api.github.com/repos/18F/cg-dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/cg-dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/cg-dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/cg-dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/cg-dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/18F/cg-dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/cg-dashboard/merges","archive_url":"https://api.github.com/repos/18F/cg-dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/cg-dashboard/downloads","issues_url":"https://api.github.com/repos/18F/cg-dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/18F/cg-dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/cg-dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/cg-dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/cg-dashboard/labels{/name}","releases_url":"https://api.github.com/repos/18F/cg-dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/18F/cg-dashboard/deployments","created_at":"2015-07-16T17:27:45Z","updated_at":"2017-03-20T18:59:58Z","pushed_at":"2017-04-20T23:15:45Z","git_url":"git://github.com/18F/cg-dashboard.git","ssh_url":"git@github.com:18F/cg-dashboard.git","clone_url":"https://github.com/18F/cg-dashboard.git","svn_url":"https://github.com/18F/cg-dashboard","homepage":"https://dashboard.fr.cloud.gov","size":5053,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":95,"forks":11,"open_issues":95,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/cg-dashboard/pulls/1071"},"html":{"href":"https://github.com/18F/cg-dashboard/pull/1071"},"issue":{"href":"https://api.github.com/repos/18F/cg-dashboard/issues/1071"},"comments":{"href":"https://api.github.com/repos/18F/cg-dashboard/issues/1071/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/cg-dashboard/pulls/1071/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/cg-dashboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/cg-dashboard/pulls/1071/commits"},"statuses":{"href":"https://api.github.com/repos/18F/cg-dashboard/statuses/8f58799bebf968d2e9dadcd6bc5ed5cbaabd6c65"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":3,"deletions":4,"changed_files":1}}
{"actor":{"display_login":"adborden"}}