{"action":"created","comment":{"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments/142962080","pull_request_review_id":67403072,"id":142962080,"diff_hunk":"@@ -90,8 +91,14 @@ function letters(state = initialState, action) {\n       const benefitInfo = action.data.data.attributes.benefitInformation;\n       const possibleOptions = [];\n       Object.keys(benefitInfo).forEach(key => {\n-        if ((optionsToAlwaysDisplay.includes(key) || (benefitInfo[key] !== false)) &&\n-            !possibleOptions.includes[key]) {\n+        if (\n+          // the option should always be displayed or vets-api says it is available\n+          (optionsToAlwaysDisplay.includes(key) || (benefitInfo[key] !== false))\n+          // and the option is not yet in the possibleOptions array\n+          && !possibleOptions.includes[key]\n+          // and the option is a customization option that vets-api supports\n+          &&  REQUEST_OPTIONS[key]","path":"src/js/letters/reducers/index.js","position":53,"original_position":53,"commit_id":"4d63707a8d8a95587e7d89d6eab393bdf4a11d55","original_commit_id":"4d63707a8d8a95587e7d89d6eab393bdf4a11d55","user":{"login":"markgreenburg","id":24251447,"avatar_url":"https://avatars0.githubusercontent.com/u/24251447?v=4","gravatar_id":"","url":"https://api.github.com/users/markgreenburg","html_url":"https://github.com/markgreenburg","followers_url":"https://api.github.com/users/markgreenburg/followers","following_url":"https://api.github.com/users/markgreenburg/following{/other_user}","gists_url":"https://api.github.com/users/markgreenburg/gists{/gist_id}","starred_url":"https://api.github.com/users/markgreenburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markgreenburg/subscriptions","organizations_url":"https://api.github.com/users/markgreenburg/orgs","repos_url":"https://api.github.com/users/markgreenburg/repos","events_url":"https://api.github.com/users/markgreenburg/events{/privacy}","received_events_url":"https://api.github.com/users/markgreenburg/received_events","type":"User","site_admin":false},"body":"ahh you're right, glad you found it :)\r\nKind of surprised that the linter didn't yell at me.","created_at":"2017-10-05T14:54:13Z","updated_at":"2017-10-05T14:54:13Z","html_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/6528#discussion_r142962080","pull_request_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/6528","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments/142962080"},"html":{"href":"https://github.com/department-of-veterans-affairs/vets-website/pull/6528#discussion_r142962080"},"pull_request":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/6528"}},"in_reply_to_id":142257293},"pull_request":{"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/6528","id":143945734,"html_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/6528","diff_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/6528.diff","patch_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/6528.patch","issue_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/6528","number":6528,"state":"open","locked":false,"title":"Check request options against supported vets-api BSL customization op…","user":{"login":"markgreenburg","id":24251447,"avatar_url":"https://avatars0.githubusercontent.com/u/24251447?v=4","gravatar_id":"","url":"https://api.github.com/users/markgreenburg","html_url":"https://github.com/markgreenburg","followers_url":"https://api.github.com/users/markgreenburg/followers","following_url":"https://api.github.com/users/markgreenburg/following{/other_user}","gists_url":"https://api.github.com/users/markgreenburg/gists{/gist_id}","starred_url":"https://api.github.com/users/markgreenburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markgreenburg/subscriptions","organizations_url":"https://api.github.com/users/markgreenburg/orgs","repos_url":"https://api.github.com/users/markgreenburg/repos","events_url":"https://api.github.com/users/markgreenburg/events{/privacy}","received_events_url":"https://api.github.com/users/markgreenburg/received_events","type":"User","site_admin":false},"body":"…tions\r\n\r\nConnects to https://github.com/department-of-veterans-affairs/vets.gov-team/issues/5111, https://github.com/department-of-veterans-affairs/vets.gov-team/issues/3872\r\n\r\nWe should ensure that we're only passing valid options to vets-api when we specify how a user wants their BSL customized. The least \"why is this happening\" approach seemed to me to create a new constant that reflects which of the benefit options are actually able to be customized in our request to vets-api, and then ensure that our request options object only contains these recognized keys.\r\n\r\nIn the future, if the `BENEFIT_OPTIONS` we receive from `vets-api` continue to diverge from `REQUEST-OPTIONS` accepted by `vets-api`, we'll be able to just modify the `REQUEST-OPTIONS` constant further.","created_at":"2017-09-29T18:02:19Z","updated_at":"2017-10-05T14:54:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee44f61f8c62a619de4b0733404dd314da89d514","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/6528/commits","review_comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/6528/comments","review_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments{/number}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/6528/comments","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/4d63707a8d8a95587e7d89d6eab393bdf4a11d55","head":{"label":"department-of-veterans-affairs:bsl-download-mg","ref":"bsl-download-mg","sha":"4d63707a8d8a95587e7d89d6eab393bdf4a11d55","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":33202667,"name":"vets-website","full_name":"department-of-veterans-affairs/vets-website","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/vets-website","description":"Frontend for Vets.gov","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/deployments","created_at":"2015-03-31T18:34:05Z","updated_at":"2017-10-05T01:46:45Z","pushed_at":"2017-10-05T13:38:48Z","git_url":"git://github.com/department-of-veterans-affairs/vets-website.git","ssh_url":"git@github.com:department-of-veterans-affairs/vets-website.git","clone_url":"https://github.com/department-of-veterans-affairs/vets-website.git","svn_url":"https://github.com/department-of-veterans-affairs/vets-website","homepage":"","size":112260,"stargazers_count":96,"watchers_count":96,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":49,"forks":49,"open_issues":49,"watchers":96,"default_branch":"master"}},"base":{"label":"department-of-veterans-affairs:master","ref":"master","sha":"33f2cb0f323da95dd61c3398e800fe8f8b47819a","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":33202667,"name":"vets-website","full_name":"department-of-veterans-affairs/vets-website","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/vets-website","description":"Frontend for Vets.gov","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/deployments","created_at":"2015-03-31T18:34:05Z","updated_at":"2017-10-05T01:46:45Z","pushed_at":"2017-10-05T13:38:48Z","git_url":"git://github.com/department-of-veterans-affairs/vets-website.git","ssh_url":"git@github.com:department-of-veterans-affairs/vets-website.git","clone_url":"https://github.com/department-of-veterans-affairs/vets-website.git","svn_url":"https://github.com/department-of-veterans-affairs/vets-website","homepage":"","size":112260,"stargazers_count":96,"watchers_count":96,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":49,"forks":49,"open_issues":49,"watchers":96,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/6528"},"html":{"href":"https://github.com/department-of-veterans-affairs/vets-website/pull/6528"},"issue":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/6528"},"comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/6528/comments"},"review_comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/6528/comments"},"review_comment":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/6528/commits"},"statuses":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/4d63707a8d8a95587e7d89d6eab393bdf4a11d55"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"markgreenburg"}}