payload: {"action":"created","comment":{"url":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/comments/263567976","pull_request_review_id":212020492,"id":263567976,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2MzU2Nzk3Ng==","diff_hunk":"@@ -22,13 +24,33 @@\n config = configparser.ConfigParser()\n \n \n-def read_config():\n+class ConfigFile(Enum):\n+    ALL = 0\n+    if platform.system() == 'Linux':\n+        SYSTEM = '/etc/westconfig'\n+    elif platform.system() == 'Darwin':  # Mac OS\n+        # This was seen on a local machine ($(prefix) = /usr/local)\n+        SYSTEM = '/usr/local/etc/westconfig'\n+    elif platform.system() == 'Windows':\n+        # Seen on a local machine\n+        SYSTEM = os.path.expandvars('%PROGRAMDATA%\\\\west\\\\config')\n+    GLOBAL = os.path.expanduser('~/.westconfig')\n+    LOCAL = 'config'\n+\n+\n+def read_config(config_file=ConfigFile.ALL, config=config):\n     '''\n     Reads all configuration files, making the configuration values available as\n     a configparser.ConfigParser object in config.config. This object works\n     similarly to a dictionary: config.config['foo']['bar'] gets the value for\n     key 'bar' in section 'foo'.\n \n+    If config_file is given, then read only that particular file, file can be\n+    either 'local', 'global', or 'system'.\n+\n+    If config object is provided, then store then make all configuration values\n+    available in that object instead of config.config object.","path":"src/west/config.py","position":39,"original_position":39,"commit_id":"656ca64b7a0ecdd113c7bcfcc5180ec544648187","original_commit_id":"656ca64b7a0ecdd113c7bcfcc5180ec544648187","user":{"login":"tejlmand","id":9802583,"node_id":"MDQ6VXNlcjk4MDI1ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/9802583?v=4","gravatar_id":"","url":"https://api.github.com/users/tejlmand","html_url":"https://github.com/tejlmand","followers_url":"https://api.github.com/users/tejlmand/followers","following_url":"https://api.github.com/users/tejlmand/following{/other_user}","gists_url":"https://api.github.com/users/tejlmand/gists{/gist_id}","starred_url":"https://api.github.com/users/tejlmand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejlmand/subscriptions","organizations_url":"https://api.github.com/users/tejlmand/orgs","repos_url":"https://api.github.com/users/tejlmand/repos","events_url":"https://api.github.com/users/tejlmand/events{/privacy}","received_events_url":"https://api.github.com/users/tejlmand/received_events","type":"User","site_admin":false},"body":"yep, better wording :)","created_at":"2019-03-07T21:08:14Z","updated_at":"2019-03-07T21:08:14Z","html_url":"https://github.com/zephyrproject-rtos/west/pull/215#discussion_r263567976","pull_request_url":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/215","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/comments/263567976"},"html":{"href":"https://github.com/zephyrproject-rtos/west/pull/215#discussion_r263567976"},"pull_request":{"href":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/215"}},"in_reply_to_id":263510582},"pull_request":{"url":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/215","id":255803090,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU1ODAzMDkw","html_url":"https://github.com/zephyrproject-rtos/west/pull/215","diff_url":"https://github.com/zephyrproject-rtos/west/pull/215.diff","patch_url":"https://github.com/zephyrproject-rtos/west/pull/215.patch","issue_url":"https://api.github.com/repos/zephyrproject-rtos/west/issues/215","number":215,"state":"open","locked":false,"title":"command: Added `west config` command for handling of west config files","user":{"login":"tejlmand","id":9802583,"node_id":"MDQ6VXNlcjk4MDI1ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/9802583?v=4","gravatar_id":"","url":"https://api.github.com/users/tejlmand","html_url":"https://github.com/tejlmand","followers_url":"https://api.github.com/users/tejlmand/followers","following_url":"https://api.github.com/users/tejlmand/following{/other_user}","gists_url":"https://api.github.com/users/tejlmand/gists{/gist_id}","starred_url":"https://api.github.com/users/tejlmand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejlmand/subscriptions","organizations_url":"https://api.github.com/users/tejlmand/orgs","repos_url":"https://api.github.com/users/tejlmand/repos","events_url":"https://api.github.com/users/tejlmand/events{/privacy}","received_events_url":"https://api.github.com/users/tejlmand/received_events","type":"User","site_admin":false},"body":"Commands are:\r\n`west config [--system | --global | --local] <name>`\r\n`west config [--system | --global | --local] <name> <value>`\r\n\r\nwhere name is: `<section.key>`.\r\n\r\nThis command functions similar to `git config`\r\n\r\n-- Commit message.\r\nFixes: #198 #213 \r\n\r\nThis commit add the command `west config` for getting and setting of\r\nkey - value pairs in:\r\n- Project specific: `<project>/.west/config`\r\n- Global specific: `~/.westconfig`\r\n- System specific, Linux:`/etc/westconfig`\r\n                   MacOS: `/usr/local/etc/westconfig`\r\n                   Windows: `%PROGRAMDATA%/west/config`\r\nIt also includes corresponding test cases.\r\n\r\nSigned-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>","created_at":"2019-02-25T08:51:45Z","updated_at":"2019-03-07T21:08:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4e7c800330e0304399de02c429c2a6df34056df","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/215/commits","review_comments_url":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/215/comments","review_comment_url":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/west/issues/215/comments","statuses_url":"https://api.github.com/repos/zephyrproject-rtos/west/statuses/656ca64b7a0ecdd113c7bcfcc5180ec544648187","head":{"label":"tejlmand:issue_198_west_config","ref":"issue_198_west_config","sha":"656ca64b7a0ecdd113c7bcfcc5180ec544648187","user":{"login":"tejlmand","id":9802583,"node_id":"MDQ6VXNlcjk4MDI1ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/9802583?v=4","gravatar_id":"","url":"https://api.github.com/users/tejlmand","html_url":"https://github.com/tejlmand","followers_url":"https://api.github.com/users/tejlmand/followers","following_url":"https://api.github.com/users/tejlmand/following{/other_user}","gists_url":"https://api.github.com/users/tejlmand/gists{/gist_id}","starred_url":"https://api.github.com/users/tejlmand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejlmand/subscriptions","organizations_url":"https://api.github.com/users/tejlmand/orgs","repos_url":"https://api.github.com/users/tejlmand/repos","events_url":"https://api.github.com/users/tejlmand/events{/privacy}","received_events_url":"https://api.github.com/users/tejlmand/received_events","type":"User","site_admin":false},"repo":{"id":158535377,"node_id":"MDEwOlJlcG9zaXRvcnkxNTg1MzUzNzc=","name":"west","full_name":"tejlmand/west","private":false,"owner":{"login":"tejlmand","id":9802583,"node_id":"MDQ6VXNlcjk4MDI1ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/9802583?v=4","gravatar_id":"","url":"https://api.github.com/users/tejlmand","html_url":"https://github.com/tejlmand","followers_url":"https://api.github.com/users/tejlmand/followers","following_url":"https://api.github.com/users/tejlmand/following{/other_user}","gists_url":"https://api.github.com/users/tejlmand/gists{/gist_id}","starred_url":"https://api.github.com/users/tejlmand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejlmand/subscriptions","organizations_url":"https://api.github.com/users/tejlmand/orgs","repos_url":"https://api.github.com/users/tejlmand/repos","events_url":"https://api.github.com/users/tejlmand/events{/privacy}","received_events_url":"https://api.github.com/users/tejlmand/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tejlmand/west","description":null,"fork":true,"url":"https://api.github.com/repos/tejlmand/west","forks_url":"https://api.github.com/repos/tejlmand/west/forks","keys_url":"https://api.github.com/repos/tejlmand/west/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tejlmand/west/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tejlmand/west/teams","hooks_url":"https://api.github.com/repos/tejlmand/west/hooks","issue_events_url":"https://api.github.com/repos/tejlmand/west/issues/events{/number}","events_url":"https://api.github.com/repos/tejlmand/west/events","assignees_url":"https://api.github.com/repos/tejlmand/west/assignees{/user}","branches_url":"https://api.github.com/repos/tejlmand/west/branches{/branch}","tags_url":"https://api.github.com/repos/tejlmand/west/tags","blobs_url":"https://api.github.com/repos/tejlmand/west/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tejlmand/west/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tejlmand/west/git/refs{/sha}","trees_url":"https://api.github.com/repos/tejlmand/west/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tejlmand/west/statuses/{sha}","languages_url":"https://api.github.com/repos/tejlmand/west/languages","stargazers_url":"https://api.github.com/repos/tejlmand/west/stargazers","contributors_url":"https://api.github.com/repos/tejlmand/west/contributors","subscribers_url":"https://api.github.com/repos/tejlmand/west/subscribers","subscription_url":"https://api.github.com/repos/tejlmand/west/subscription","commits_url":"https://api.github.com/repos/tejlmand/west/commits{/sha}","git_commits_url":"https://api.github.com/repos/tejlmand/west/git/commits{/sha}","comments_url":"https://api.github.com/repos/tejlmand/west/comments{/number}","issue_comment_url":"https://api.github.com/repos/tejlmand/west/issues/comments{/number}","contents_url":"https://api.github.com/repos/tejlmand/west/contents/{+path}","compare_url":"https://api.github.com/repos/tejlmand/west/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tejlmand/west/merges","archive_url":"https://api.github.com/repos/tejlmand/west/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tejlmand/west/downloads","issues_url":"https://api.github.com/repos/tejlmand/west/issues{/number}","pulls_url":"https://api.github.com/repos/tejlmand/west/pulls{/number}","milestones_url":"https://api.github.com/repos/tejlmand/west/milestones{/number}","notifications_url":"https://api.github.com/repos/tejlmand/west/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tejlmand/west/labels{/name}","releases_url":"https://api.github.com/repos/tejlmand/west/releases{/id}","deployments_url":"https://api.github.com/repos/tejlmand/west/deployments","created_at":"2018-11-21T11:07:19Z","updated_at":"2019-02-25T14:00:47Z","pushed_at":"2019-03-06T19:31:19Z","git_url":"git://github.com/tejlmand/west.git","ssh_url":"git@github.com:tejlmand/west.git","clone_url":"https://github.com/tejlmand/west.git","svn_url":"https://github.com/tejlmand/west","homepage":null,"size":534,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":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":"zephyrproject-rtos:master","ref":"master","sha":"cc5a05fec57a6c98c06056a2665254d968930168","user":{"login":"zephyrproject-rtos","id":19595895,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTk1ODk1","avatar_url":"https://avatars2.githubusercontent.com/u/19595895?v=4","gravatar_id":"","url":"https://api.github.com/users/zephyrproject-rtos","html_url":"https://github.com/zephyrproject-rtos","followers_url":"https://api.github.com/users/zephyrproject-rtos/followers","following_url":"https://api.github.com/users/zephyrproject-rtos/following{/other_user}","gists_url":"https://api.github.com/users/zephyrproject-rtos/gists{/gist_id}","starred_url":"https://api.github.com/users/zephyrproject-rtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zephyrproject-rtos/subscriptions","organizations_url":"https://api.github.com/users/zephyrproject-rtos/orgs","repos_url":"https://api.github.com/users/zephyrproject-rtos/repos","events_url":"https://api.github.com/users/zephyrproject-rtos/events{/privacy}","received_events_url":"https://api.github.com/users/zephyrproject-rtos/received_events","type":"Organization","site_admin":false},"repo":{"id":134577458,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ1Nzc0NTg=","name":"west","full_name":"zephyrproject-rtos/west","private":false,"owner":{"login":"zephyrproject-rtos","id":19595895,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTk1ODk1","avatar_url":"https://avatars2.githubusercontent.com/u/19595895?v=4","gravatar_id":"","url":"https://api.github.com/users/zephyrproject-rtos","html_url":"https://github.com/zephyrproject-rtos","followers_url":"https://api.github.com/users/zephyrproject-rtos/followers","following_url":"https://api.github.com/users/zephyrproject-rtos/following{/other_user}","gists_url":"https://api.github.com/users/zephyrproject-rtos/gists{/gist_id}","starred_url":"https://api.github.com/users/zephyrproject-rtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zephyrproject-rtos/subscriptions","organizations_url":"https://api.github.com/users/zephyrproject-rtos/orgs","repos_url":"https://api.github.com/users/zephyrproject-rtos/repos","events_url":"https://api.github.com/users/zephyrproject-rtos/events{/privacy}","received_events_url":"https://api.github.com/users/zephyrproject-rtos/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/zephyrproject-rtos/west","description":"West, Zephyr's meta-tool","fork":false,"url":"https://api.github.com/repos/zephyrproject-rtos/west","forks_url":"https://api.github.com/repos/zephyrproject-rtos/west/forks","keys_url":"https://api.github.com/repos/zephyrproject-rtos/west/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zephyrproject-rtos/west/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zephyrproject-rtos/west/teams","hooks_url":"https://api.github.com/repos/zephyrproject-rtos/west/hooks","issue_events_url":"https://api.github.com/repos/zephyrproject-rtos/west/issues/events{/number}","events_url":"https://api.github.com/repos/zephyrproject-rtos/west/events","assignees_url":"https://api.github.com/repos/zephyrproject-rtos/west/assignees{/user}","branches_url":"https://api.github.com/repos/zephyrproject-rtos/west/branches{/branch}","tags_url":"https://api.github.com/repos/zephyrproject-rtos/west/tags","blobs_url":"https://api.github.com/repos/zephyrproject-rtos/west/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zephyrproject-rtos/west/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zephyrproject-rtos/west/git/refs{/sha}","trees_url":"https://api.github.com/repos/zephyrproject-rtos/west/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zephyrproject-rtos/west/statuses/{sha}","languages_url":"https://api.github.com/repos/zephyrproject-rtos/west/languages","stargazers_url":"https://api.github.com/repos/zephyrproject-rtos/west/stargazers","contributors_url":"https://api.github.com/repos/zephyrproject-rtos/west/contributors","subscribers_url":"https://api.github.com/repos/zephyrproject-rtos/west/subscribers","subscription_url":"https://api.github.com/repos/zephyrproject-rtos/west/subscription","commits_url":"https://api.github.com/repos/zephyrproject-rtos/west/commits{/sha}","git_commits_url":"https://api.github.com/repos/zephyrproject-rtos/west/git/commits{/sha}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/west/comments{/number}","issue_comment_url":"https://api.github.com/repos/zephyrproject-rtos/west/issues/comments{/number}","contents_url":"https://api.github.com/repos/zephyrproject-rtos/west/contents/{+path}","compare_url":"https://api.github.com/repos/zephyrproject-rtos/west/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zephyrproject-rtos/west/merges","archive_url":"https://api.github.com/repos/zephyrproject-rtos/west/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zephyrproject-rtos/west/downloads","issues_url":"https://api.github.com/repos/zephyrproject-rtos/west/issues{/number}","pulls_url":"https://api.github.com/repos/zephyrproject-rtos/west/pulls{/number}","milestones_url":"https://api.github.com/repos/zephyrproject-rtos/west/milestones{/number}","notifications_url":"https://api.github.com/repos/zephyrproject-rtos/west/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zephyrproject-rtos/west/labels{/name}","releases_url":"https://api.github.com/repos/zephyrproject-rtos/west/releases{/id}","deployments_url":"https://api.github.com/repos/zephyrproject-rtos/west/deployments","created_at":"2018-05-23T13:56:05Z","updated_at":"2019-03-05T13:26:09Z","pushed_at":"2019-03-07T19:35:41Z","git_url":"git://github.com/zephyrproject-rtos/west.git","ssh_url":"git@github.com:zephyrproject-rtos/west.git","clone_url":"https://github.com/zephyrproject-rtos/west.git","svn_url":"https://github.com/zephyrproject-rtos/west","homepage":"https://docs.zephyrproject.org/latest/tools/west/index.html","size":512,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":32,"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":18,"open_issues":32,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/215"},"html":{"href":"https://github.com/zephyrproject-rtos/west/pull/215"},"issue":{"href":"https://api.github.com/repos/zephyrproject-rtos/west/issues/215"},"comments":{"href":"https://api.github.com/repos/zephyrproject-rtos/west/issues/215/comments"},"review_comments":{"href":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/215/comments"},"review_comment":{"href":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zephyrproject-rtos/west/pulls/215/commits"},"statuses":{"href":"https://api.github.com/repos/zephyrproject-rtos/west/statuses/656ca64b7a0ecdd113c7bcfcc5180ec544648187"}},"author_association":"COLLABORATOR"}}
other: {"actor":{"display_login":"tejlmand"}}