{"action":"created","comment":{"url":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/comments/76705688","id":76705688,"diff_hunk":"@@ -150,28 +155,36 @@ def validate_config(config, main_section):\n         get_service(service).validate_config(config, target)\n \n \n-def load_config(main_section, interactive=False):\n-    config = ConfigParser({'log.level': \"INFO\", 'log.file': None})\n+def get_config_path():\n+    \"\"\"\n+    Determine the path to the config file. This will return, in this order of\n+    precedence:\n+    - the value of $BUGWARRIORRC if set\n+    - $XDG_CONFIG_HOME/bugwarrior/bugwarriorc if exists\n+    - <dir>/bugwarrior/bugwarriorc if exists, for dir in $XDG_CONFIG_DIRS\n+    - ~/.bugwarriorrc if exists\n+    - $XDG_CONFIG_HOME/bugwarrior/bugwarriorc otherwise\n+    \"\"\"","path":"bugwarrior/config.py","position":27,"original_position":27,"commit_id":"3e47a474c2934e86bf7972e0d8eac3fee4231b54","original_commit_id":"cd7125fb037ba4e95a09343d0ee3dbf7f6cf272e","user":{"login":"ryneeverett","id":3280280,"avatar_url":"https://avatars.githubusercontent.com/u/3280280?v=3","gravatar_id":"","url":"https://api.github.com/users/ryneeverett","html_url":"https://github.com/ryneeverett","followers_url":"https://api.github.com/users/ryneeverett/followers","following_url":"https://api.github.com/users/ryneeverett/following{/other_user}","gists_url":"https://api.github.com/users/ryneeverett/gists{/gist_id}","starred_url":"https://api.github.com/users/ryneeverett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryneeverett/subscriptions","organizations_url":"https://api.github.com/users/ryneeverett/orgs","repos_url":"https://api.github.com/users/ryneeverett/repos","events_url":"https://api.github.com/users/ryneeverett/events{/privacy}","received_events_url":"https://api.github.com/users/ryneeverett/received_events","type":"User","site_admin":false},"body":"Sounds right to me too.","created_at":"2016-08-29T23:16:58Z","updated_at":"2016-08-29T23:16:58Z","html_url":"https://github.com/ralphbean/bugwarrior/pull/370#discussion_r76705688","pull_request_url":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/370","_links":{"self":{"href":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/comments/76705688"},"html":{"href":"https://github.com/ralphbean/bugwarrior/pull/370#discussion_r76705688"},"pull_request":{"href":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/370"}}},"pull_request":{"url":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/370","id":82994473,"html_url":"https://github.com/ralphbean/bugwarrior/pull/370","diff_url":"https://github.com/ralphbean/bugwarrior/pull/370.diff","patch_url":"https://github.com/ralphbean/bugwarrior/pull/370.patch","issue_url":"https://api.github.com/repos/ralphbean/bugwarrior/issues/370","number":370,"state":"open","locked":false,"title":"Add support for environment variable $BUGWARRIORRC","user":{"login":"gdetrez","id":38019,"avatar_url":"https://avatars.githubusercontent.com/u/38019?v=3","gravatar_id":"","url":"https://api.github.com/users/gdetrez","html_url":"https://github.com/gdetrez","followers_url":"https://api.github.com/users/gdetrez/followers","following_url":"https://api.github.com/users/gdetrez/following{/other_user}","gists_url":"https://api.github.com/users/gdetrez/gists{/gist_id}","starred_url":"https://api.github.com/users/gdetrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdetrez/subscriptions","organizations_url":"https://api.github.com/users/gdetrez/orgs","repos_url":"https://api.github.com/users/gdetrez/repos","events_url":"https://api.github.com/users/gdetrez/events{/privacy}","received_events_url":"https://api.github.com/users/gdetrez/received_events","type":"User","site_admin":false},"body":"* If `$BUGWARRIORRC` is set, then bugwarrior will try to read its\r\n  configuration file from its content\r\n* Extract the code that guess the path to the configuration file in its\r\n  own function.\r\n* Add some unit tests\r\n\r\nI got a bit tired of editing my own `.bugwarriorrc` to test bugwarrior. This is inspired by the similar variable `TASKRC` used by taskwarrior.","created_at":"2016-08-27T18:07:54Z","updated_at":"2016-08-29T23:16:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e1765d3481c5195b4cedc73ddc3ada6bdb8e133","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/370/commits","review_comments_url":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/370/comments","review_comment_url":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ralphbean/bugwarrior/issues/370/comments","statuses_url":"https://api.github.com/repos/ralphbean/bugwarrior/statuses/3e47a474c2934e86bf7972e0d8eac3fee4231b54","head":{"label":"gdetrez:bugwarriorrc","ref":"bugwarriorrc","sha":"3e47a474c2934e86bf7972e0d8eac3fee4231b54","user":{"login":"gdetrez","id":38019,"avatar_url":"https://avatars.githubusercontent.com/u/38019?v=3","gravatar_id":"","url":"https://api.github.com/users/gdetrez","html_url":"https://github.com/gdetrez","followers_url":"https://api.github.com/users/gdetrez/followers","following_url":"https://api.github.com/users/gdetrez/following{/other_user}","gists_url":"https://api.github.com/users/gdetrez/gists{/gist_id}","starred_url":"https://api.github.com/users/gdetrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdetrez/subscriptions","organizations_url":"https://api.github.com/users/gdetrez/orgs","repos_url":"https://api.github.com/users/gdetrez/repos","events_url":"https://api.github.com/users/gdetrez/events{/privacy}","received_events_url":"https://api.github.com/users/gdetrez/received_events","type":"User","site_admin":false},"repo":{"id":45335263,"name":"bugwarrior","full_name":"gdetrez/bugwarrior","owner":{"login":"gdetrez","id":38019,"avatar_url":"https://avatars.githubusercontent.com/u/38019?v=3","gravatar_id":"","url":"https://api.github.com/users/gdetrez","html_url":"https://github.com/gdetrez","followers_url":"https://api.github.com/users/gdetrez/followers","following_url":"https://api.github.com/users/gdetrez/following{/other_user}","gists_url":"https://api.github.com/users/gdetrez/gists{/gist_id}","starred_url":"https://api.github.com/users/gdetrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdetrez/subscriptions","organizations_url":"https://api.github.com/users/gdetrez/orgs","repos_url":"https://api.github.com/users/gdetrez/repos","events_url":"https://api.github.com/users/gdetrez/events{/privacy}","received_events_url":"https://api.github.com/users/gdetrez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gdetrez/bugwarrior","description":"Pull github, bitbucket, and trac issues into taskwarrior","fork":true,"url":"https://api.github.com/repos/gdetrez/bugwarrior","forks_url":"https://api.github.com/repos/gdetrez/bugwarrior/forks","keys_url":"https://api.github.com/repos/gdetrez/bugwarrior/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gdetrez/bugwarrior/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gdetrez/bugwarrior/teams","hooks_url":"https://api.github.com/repos/gdetrez/bugwarrior/hooks","issue_events_url":"https://api.github.com/repos/gdetrez/bugwarrior/issues/events{/number}","events_url":"https://api.github.com/repos/gdetrez/bugwarrior/events","assignees_url":"https://api.github.com/repos/gdetrez/bugwarrior/assignees{/user}","branches_url":"https://api.github.com/repos/gdetrez/bugwarrior/branches{/branch}","tags_url":"https://api.github.com/repos/gdetrez/bugwarrior/tags","blobs_url":"https://api.github.com/repos/gdetrez/bugwarrior/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gdetrez/bugwarrior/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gdetrez/bugwarrior/git/refs{/sha}","trees_url":"https://api.github.com/repos/gdetrez/bugwarrior/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gdetrez/bugwarrior/statuses/{sha}","languages_url":"https://api.github.com/repos/gdetrez/bugwarrior/languages","stargazers_url":"https://api.github.com/repos/gdetrez/bugwarrior/stargazers","contributors_url":"https://api.github.com/repos/gdetrez/bugwarrior/contributors","subscribers_url":"https://api.github.com/repos/gdetrez/bugwarrior/subscribers","subscription_url":"https://api.github.com/repos/gdetrez/bugwarrior/subscription","commits_url":"https://api.github.com/repos/gdetrez/bugwarrior/commits{/sha}","git_commits_url":"https://api.github.com/repos/gdetrez/bugwarrior/git/commits{/sha}","comments_url":"https://api.github.com/repos/gdetrez/bugwarrior/comments{/number}","issue_comment_url":"https://api.github.com/repos/gdetrez/bugwarrior/issues/comments{/number}","contents_url":"https://api.github.com/repos/gdetrez/bugwarrior/contents/{+path}","compare_url":"https://api.github.com/repos/gdetrez/bugwarrior/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gdetrez/bugwarrior/merges","archive_url":"https://api.github.com/repos/gdetrez/bugwarrior/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gdetrez/bugwarrior/downloads","issues_url":"https://api.github.com/repos/gdetrez/bugwarrior/issues{/number}","pulls_url":"https://api.github.com/repos/gdetrez/bugwarrior/pulls{/number}","milestones_url":"https://api.github.com/repos/gdetrez/bugwarrior/milestones{/number}","notifications_url":"https://api.github.com/repos/gdetrez/bugwarrior/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gdetrez/bugwarrior/labels{/name}","releases_url":"https://api.github.com/repos/gdetrez/bugwarrior/releases{/id}","deployments_url":"https://api.github.com/repos/gdetrez/bugwarrior/deployments","created_at":"2015-11-01T09:52:00Z","updated_at":"2016-02-15T11:35:52Z","pushed_at":"2016-08-29T14:48:24Z","git_url":"git://github.com/gdetrez/bugwarrior.git","ssh_url":"git@github.com:gdetrez/bugwarrior.git","clone_url":"https://github.com/gdetrez/bugwarrior.git","svn_url":"https://github.com/gdetrez/bugwarrior","homepage":"http://pypi.python.org/pypi/bugwarrior","size":1008,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ralphbean:develop","ref":"develop","sha":"0f03007e8c956103b7cc95c7e25be78b36c2093b","user":{"login":"ralphbean","id":331338,"avatar_url":"https://avatars.githubusercontent.com/u/331338?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphbean","html_url":"https://github.com/ralphbean","followers_url":"https://api.github.com/users/ralphbean/followers","following_url":"https://api.github.com/users/ralphbean/following{/other_user}","gists_url":"https://api.github.com/users/ralphbean/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphbean/subscriptions","organizations_url":"https://api.github.com/users/ralphbean/orgs","repos_url":"https://api.github.com/users/ralphbean/repos","events_url":"https://api.github.com/users/ralphbean/events{/privacy}","received_events_url":"https://api.github.com/users/ralphbean/received_events","type":"User","site_admin":false},"repo":{"id":2985492,"name":"bugwarrior","full_name":"ralphbean/bugwarrior","owner":{"login":"ralphbean","id":331338,"avatar_url":"https://avatars.githubusercontent.com/u/331338?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphbean","html_url":"https://github.com/ralphbean","followers_url":"https://api.github.com/users/ralphbean/followers","following_url":"https://api.github.com/users/ralphbean/following{/other_user}","gists_url":"https://api.github.com/users/ralphbean/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphbean/subscriptions","organizations_url":"https://api.github.com/users/ralphbean/orgs","repos_url":"https://api.github.com/users/ralphbean/repos","events_url":"https://api.github.com/users/ralphbean/events{/privacy}","received_events_url":"https://api.github.com/users/ralphbean/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ralphbean/bugwarrior","description":"Pull github, bitbucket, and trac issues into taskwarrior","fork":false,"url":"https://api.github.com/repos/ralphbean/bugwarrior","forks_url":"https://api.github.com/repos/ralphbean/bugwarrior/forks","keys_url":"https://api.github.com/repos/ralphbean/bugwarrior/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ralphbean/bugwarrior/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ralphbean/bugwarrior/teams","hooks_url":"https://api.github.com/repos/ralphbean/bugwarrior/hooks","issue_events_url":"https://api.github.com/repos/ralphbean/bugwarrior/issues/events{/number}","events_url":"https://api.github.com/repos/ralphbean/bugwarrior/events","assignees_url":"https://api.github.com/repos/ralphbean/bugwarrior/assignees{/user}","branches_url":"https://api.github.com/repos/ralphbean/bugwarrior/branches{/branch}","tags_url":"https://api.github.com/repos/ralphbean/bugwarrior/tags","blobs_url":"https://api.github.com/repos/ralphbean/bugwarrior/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ralphbean/bugwarrior/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ralphbean/bugwarrior/git/refs{/sha}","trees_url":"https://api.github.com/repos/ralphbean/bugwarrior/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ralphbean/bugwarrior/statuses/{sha}","languages_url":"https://api.github.com/repos/ralphbean/bugwarrior/languages","stargazers_url":"https://api.github.com/repos/ralphbean/bugwarrior/stargazers","contributors_url":"https://api.github.com/repos/ralphbean/bugwarrior/contributors","subscribers_url":"https://api.github.com/repos/ralphbean/bugwarrior/subscribers","subscription_url":"https://api.github.com/repos/ralphbean/bugwarrior/subscription","commits_url":"https://api.github.com/repos/ralphbean/bugwarrior/commits{/sha}","git_commits_url":"https://api.github.com/repos/ralphbean/bugwarrior/git/commits{/sha}","comments_url":"https://api.github.com/repos/ralphbean/bugwarrior/comments{/number}","issue_comment_url":"https://api.github.com/repos/ralphbean/bugwarrior/issues/comments{/number}","contents_url":"https://api.github.com/repos/ralphbean/bugwarrior/contents/{+path}","compare_url":"https://api.github.com/repos/ralphbean/bugwarrior/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ralphbean/bugwarrior/merges","archive_url":"https://api.github.com/repos/ralphbean/bugwarrior/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ralphbean/bugwarrior/downloads","issues_url":"https://api.github.com/repos/ralphbean/bugwarrior/issues{/number}","pulls_url":"https://api.github.com/repos/ralphbean/bugwarrior/pulls{/number}","milestones_url":"https://api.github.com/repos/ralphbean/bugwarrior/milestones{/number}","notifications_url":"https://api.github.com/repos/ralphbean/bugwarrior/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ralphbean/bugwarrior/labels{/name}","releases_url":"https://api.github.com/repos/ralphbean/bugwarrior/releases{/id}","deployments_url":"https://api.github.com/repos/ralphbean/bugwarrior/deployments","created_at":"2011-12-15T05:02:33Z","updated_at":"2016-08-29T18:57:56Z","pushed_at":"2016-08-29T19:12:28Z","git_url":"git://github.com/ralphbean/bugwarrior.git","ssh_url":"git@github.com:ralphbean/bugwarrior.git","clone_url":"https://github.com/ralphbean/bugwarrior.git","svn_url":"https://github.com/ralphbean/bugwarrior","homepage":"http://pypi.python.org/pypi/bugwarrior","size":1237,"stargazers_count":212,"watchers_count":212,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":46,"forks":61,"open_issues":46,"watchers":212,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/370"},"html":{"href":"https://github.com/ralphbean/bugwarrior/pull/370"},"issue":{"href":"https://api.github.com/repos/ralphbean/bugwarrior/issues/370"},"comments":{"href":"https://api.github.com/repos/ralphbean/bugwarrior/issues/370/comments"},"review_comments":{"href":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/370/comments"},"review_comment":{"href":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ralphbean/bugwarrior/pulls/370/commits"},"statuses":{"href":"https://api.github.com/repos/ralphbean/bugwarrior/statuses/3e47a474c2934e86bf7972e0d8eac3fee4231b54"}}}}
{"actor":{"display_login":"ryneeverett"}}