{"action":"closed","number":143,"pull_request":{"url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/pulls/143","id":277417398,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc3NDE3Mzk4","html_url":"https://github.com/lyft/amundsenfrontendlibrary/pull/143","diff_url":"https://github.com/lyft/amundsenfrontendlibrary/pull/143.diff","patch_url":"https://github.com/lyft/amundsenfrontendlibrary/pull/143.patch","issue_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/issues/143","number":143,"state":"closed","locked":false,"title":"Implements new utility methods to handle the request headers","user":{"login":"verdan","id":25360476,"node_id":"MDQ6VXNlcjI1MzYwNDc2","avatar_url":"https://avatars3.githubusercontent.com/u/25360476?v=4","gravatar_id":"","url":"https://api.github.com/users/verdan","html_url":"https://github.com/verdan","followers_url":"https://api.github.com/users/verdan/followers","following_url":"https://api.github.com/users/verdan/following{/other_user}","gists_url":"https://api.github.com/users/verdan/gists{/gist_id}","starred_url":"https://api.github.com/users/verdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verdan/subscriptions","organizations_url":"https://api.github.com/users/verdan/orgs","repos_url":"https://api.github.com/users/verdan/repos","events_url":"https://api.github.com/users/verdan/events{/privacy}","received_events_url":"https://api.github.com/users/verdan/received_events","type":"User","site_admin":false},"body":"### Summary of Changes\r\n\r\nFor now, the request headers can be set using config variable. This PR updates the mechanism to allow to pass a function to generate headers dynamically based on the app state by passing in the current app. This will help pass the authorization headers across different microservices i.e., JWT tokens. \r\nAlso, refactored the code and put the call and headers within the single place in the codebase. \r\n\r\n### Tests\r\n\r\nNo tests are added as this simply refactors the code a bit. \r\n\r\n### Documentation\r\n\r\nNo documentation needed. Added the docstring for newly added functions. \r\n\r\n### CheckList\r\nMake sure you have checked **all** steps below to ensure a timely review.\r\n- [X] PR title addresses the issue accurately and concisely. Example: \"Updates the version of Flask to v1.0.2\"\r\n    - In case you are adding a dependency, check if the license complies with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).\r\n- [X] PR includes a summary of changes, including screenshots of any UI changes. \r\n- [X] PR adds unit tests, updates existing unit tests, __OR__ documents why no test additions or modifications are needed.\r\n- [X] In case of new functionality, my PR adds documentation that describes how to use it.\r\n    - All the public python functions and the classes in the PR contain docstrings that explain what it does\r\n- [X] PR passes all tests documented in the [developer guide](https://github.com/lyft/amundsenfrontendlibrary/blob/master/docs/developer_guide.md#testing)\r\n- [X] I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from \"[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)\"\r\n","created_at":"2019-05-09T14:31:34Z","updated_at":"2019-05-10T05:10:22Z","closed_at":"2019-05-10T05:10:22Z","merged_at":"2019-05-10T05:10:22Z","merge_commit_sha":"bdb50e398e086bbbd998f3484f7b756c4f144a03","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/pulls/143/commits","review_comments_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/pulls/143/comments","review_comment_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/issues/143/comments","statuses_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/statuses/f3f099e39b242c11a42c42c5451bef594137dceb","head":{"label":"verdan:request-header-method","ref":"request-header-method","sha":"f3f099e39b242c11a42c42c5451bef594137dceb","user":{"login":"verdan","id":25360476,"node_id":"MDQ6VXNlcjI1MzYwNDc2","avatar_url":"https://avatars3.githubusercontent.com/u/25360476?v=4","gravatar_id":"","url":"https://api.github.com/users/verdan","html_url":"https://github.com/verdan","followers_url":"https://api.github.com/users/verdan/followers","following_url":"https://api.github.com/users/verdan/following{/other_user}","gists_url":"https://api.github.com/users/verdan/gists{/gist_id}","starred_url":"https://api.github.com/users/verdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verdan/subscriptions","organizations_url":"https://api.github.com/users/verdan/orgs","repos_url":"https://api.github.com/users/verdan/repos","events_url":"https://api.github.com/users/verdan/events{/privacy}","received_events_url":"https://api.github.com/users/verdan/received_events","type":"User","site_admin":false},"repo":{"id":172473295,"node_id":"MDEwOlJlcG9zaXRvcnkxNzI0NzMyOTU=","name":"amundsenfrontendlibrary","full_name":"verdan/amundsenfrontendlibrary","private":false,"owner":{"login":"verdan","id":25360476,"node_id":"MDQ6VXNlcjI1MzYwNDc2","avatar_url":"https://avatars3.githubusercontent.com/u/25360476?v=4","gravatar_id":"","url":"https://api.github.com/users/verdan","html_url":"https://github.com/verdan","followers_url":"https://api.github.com/users/verdan/followers","following_url":"https://api.github.com/users/verdan/following{/other_user}","gists_url":"https://api.github.com/users/verdan/gists{/gist_id}","starred_url":"https://api.github.com/users/verdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verdan/subscriptions","organizations_url":"https://api.github.com/users/verdan/orgs","repos_url":"https://api.github.com/users/verdan/repos","events_url":"https://api.github.com/users/verdan/events{/privacy}","received_events_url":"https://api.github.com/users/verdan/received_events","type":"User","site_admin":false},"html_url":"https://github.com/verdan/amundsenfrontendlibrary","description":"Front-end service library for Amundsen","fork":true,"url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary","forks_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/forks","keys_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/teams","hooks_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/hooks","issue_events_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/issues/events{/number}","events_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/events","assignees_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/assignees{/user}","branches_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/branches{/branch}","tags_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/tags","blobs_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/git/refs{/sha}","trees_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/statuses/{sha}","languages_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/languages","stargazers_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/stargazers","contributors_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/contributors","subscribers_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/subscribers","subscription_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/subscription","commits_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/commits{/sha}","git_commits_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/git/commits{/sha}","comments_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/comments{/number}","issue_comment_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/issues/comments{/number}","contents_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/contents/{+path}","compare_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/merges","archive_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/downloads","issues_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/issues{/number}","pulls_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/pulls{/number}","milestones_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/milestones{/number}","notifications_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/labels{/name}","releases_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/releases{/id}","deployments_url":"https://api.github.com/repos/verdan/amundsenfrontendlibrary/deployments","created_at":"2019-02-25T09:17:56Z","updated_at":"2019-05-09T12:13:54Z","pushed_at":"2019-05-09T14:26:36Z","git_url":"git://github.com/verdan/amundsenfrontendlibrary.git","ssh_url":"git@github.com:verdan/amundsenfrontendlibrary.git","clone_url":"https://github.com/verdan/amundsenfrontendlibrary.git","svn_url":"https://github.com/verdan/amundsenfrontendlibrary","homepage":null,"size":2235,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lyft:master","ref":"master","sha":"d34022c396db10d685603419d73c81e1b5469d2b","user":{"login":"lyft","id":4269340,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNjkzNDA=","avatar_url":"https://avatars2.githubusercontent.com/u/4269340?v=4","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"repo":{"id":169476792,"node_id":"MDEwOlJlcG9zaXRvcnkxNjk0NzY3OTI=","name":"amundsenfrontendlibrary","full_name":"lyft/amundsenfrontendlibrary","private":false,"owner":{"login":"lyft","id":4269340,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNjkzNDA=","avatar_url":"https://avatars2.githubusercontent.com/u/4269340?v=4","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/lyft/amundsenfrontendlibrary","description":"Front-end service library for Amundsen","fork":false,"url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary","forks_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/forks","keys_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/teams","hooks_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/hooks","issue_events_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/issues/events{/number}","events_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/events","assignees_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/assignees{/user}","branches_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/branches{/branch}","tags_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/tags","blobs_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/git/refs{/sha}","trees_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/statuses/{sha}","languages_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/languages","stargazers_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/stargazers","contributors_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/contributors","subscribers_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/subscribers","subscription_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/subscription","commits_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/commits{/sha}","git_commits_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/git/commits{/sha}","comments_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/comments{/number}","issue_comment_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/issues/comments{/number}","contents_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/contents/{+path}","compare_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/merges","archive_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/downloads","issues_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/issues{/number}","pulls_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/pulls{/number}","milestones_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/milestones{/number}","notifications_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/labels{/name}","releases_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/releases{/id}","deployments_url":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/deployments","created_at":"2019-02-06T21:06:01Z","updated_at":"2019-05-10T01:39:46Z","pushed_at":"2019-05-10T05:10:22Z","git_url":"git://github.com/lyft/amundsenfrontendlibrary.git","ssh_url":"git@github.com:lyft/amundsenfrontendlibrary.git","clone_url":"https://github.com/lyft/amundsenfrontendlibrary.git","svn_url":"https://github.com/lyft/amundsenfrontendlibrary","homepage":"","size":2268,"stargazers_count":121,"watchers_count":121,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":23,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":23,"open_issues":23,"watchers":121,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/pulls/143"},"html":{"href":"https://github.com/lyft/amundsenfrontendlibrary/pull/143"},"issue":{"href":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/issues/143"},"comments":{"href":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/lyft/amundsenfrontendlibrary/statuses/f3f099e39b242c11a42c42c5451bef594137dceb"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"feng-tao","id":3223098,"node_id":"MDQ6VXNlcjMyMjMwOTg=","avatar_url":"https://avatars3.githubusercontent.com/u/3223098?v=4","gravatar_id":"","url":"https://api.github.com/users/feng-tao","html_url":"https://github.com/feng-tao","followers_url":"https://api.github.com/users/feng-tao/followers","following_url":"https://api.github.com/users/feng-tao/following{/other_user}","gists_url":"https://api.github.com/users/feng-tao/gists{/gist_id}","starred_url":"https://api.github.com/users/feng-tao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feng-tao/subscriptions","organizations_url":"https://api.github.com/users/feng-tao/orgs","repos_url":"https://api.github.com/users/feng-tao/repos","events_url":"https://api.github.com/users/feng-tao/events{/privacy}","received_events_url":"https://api.github.com/users/feng-tao/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":74,"deletions":90,"changed_files":6}}
{"actor":{"display_login":"feng-tao"}}