{"action":"created","issue":{"url":"https://api.github.com/repos/Halibot/halibot/issues/96","repository_url":"https://api.github.com/repos/Halibot/halibot","labels_url":"https://api.github.com/repos/Halibot/halibot/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/Halibot/halibot/issues/96/comments","events_url":"https://api.github.com/repos/Halibot/halibot/issues/96/events","html_url":"https://github.com/Halibot/halibot/pull/96","id":267393077,"number":96,"title":"Add a config writing method to Halibot core","user":{"login":"richteer","id":3642039,"avatar_url":"https://avatars3.githubusercontent.com/u/3642039?v=4","gravatar_id":"","url":"https://api.github.com/users/richteer","html_url":"https://github.com/richteer","followers_url":"https://api.github.com/users/richteer/followers","following_url":"https://api.github.com/users/richteer/following{/other_user}","gists_url":"https://api.github.com/users/richteer/gists{/gist_id}","starred_url":"https://api.github.com/users/richteer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richteer/subscriptions","organizations_url":"https://api.github.com/users/richteer/orgs","repos_url":"https://api.github.com/users/richteer/repos","events_url":"https://api.github.com/users/richteer/events{/privacy}","received_events_url":"https://api.github.com/users/richteer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-10-21T16:13:18Z","updated_at":"2017-10-22T07:06:33Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Halibot/halibot/pulls/96","html_url":"https://github.com/Halibot/halibot/pull/96","diff_url":"https://github.com/Halibot/halibot/pull/96.diff","patch_url":"https://github.com/Halibot/halibot/pull/96.patch"},"body":"In `main.py`, we use the `Halibot` class to load the config, so we might as well write the config using it as well. We should probably consider a kwarg to `Halibot` for `config_path`, so we can stop hardcoding `\"config.json\"` everywhere -- it can be a command line argument if people really want to change it. Or if we decide that it should be `\"halibot.json\"` (which I'm starting to think might be better for clarity), it would be easier to fix everywhere.\r\n\r\nAlso included is a patch that cleans up some trailing whitespace. Figured it didn't need its own PR."},"comment":{"url":"https://api.github.com/repos/Halibot/halibot/issues/comments/338456886","html_url":"https://github.com/Halibot/halibot/pull/96#issuecomment-338456886","issue_url":"https://api.github.com/repos/Halibot/halibot/issues/96","id":338456886,"user":{"login":"richteer","id":3642039,"avatar_url":"https://avatars3.githubusercontent.com/u/3642039?v=4","gravatar_id":"","url":"https://api.github.com/users/richteer","html_url":"https://github.com/richteer","followers_url":"https://api.github.com/users/richteer/followers","following_url":"https://api.github.com/users/richteer/following{/other_user}","gists_url":"https://api.github.com/users/richteer/gists{/gist_id}","starred_url":"https://api.github.com/users/richteer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richteer/subscriptions","organizations_url":"https://api.github.com/users/richteer/orgs","repos_url":"https://api.github.com/users/richteer/repos","events_url":"https://api.github.com/users/richteer/events{/privacy}","received_events_url":"https://api.github.com/users/richteer/received_events","type":"User","site_admin":false},"created_at":"2017-10-22T07:06:33Z","updated_at":"2017-10-22T07:06:33Z","author_association":"CONTRIBUTOR","body":"> Missed writing the config again at main.py#43\r\n\r\nYeah, I was purposely ignoring those since they were effectively dumping a new file, rather than writing a `Halibot` instance's config. I agree the \"active directory\" field is probably the better approach in general. \r\n\r\nWhat are your thoughts on implementation? Default value to `\".\"`? kwarg on `__init__()`? Or just a straight field that can be modified? Personally, I'm partial to putting it on init, with a default of `\".\"`."}}
{"actor":{"display_login":"richteer"}}