{"action":"created","issue":{"url":"https://api.github.com/repos/dyweb/Ayi/issues/63","repository_url":"https://api.github.com/repos/dyweb/Ayi","labels_url":"https://api.github.com/repos/dyweb/Ayi/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/dyweb/Ayi/issues/63/comments","events_url":"https://api.github.com/repos/dyweb/Ayi/issues/63/events","html_url":"https://github.com/dyweb/Ayi/issues/63","id":196605649,"number":63,"title":"[Refactor] Move command runner to common","user":{"login":"at15","id":5621298,"avatar_url":"https://avatars.githubusercontent.com/u/5621298?v=3","gravatar_id":"","url":"https://api.github.com/users/at15","html_url":"https://github.com/at15","followers_url":"https://api.github.com/users/at15/followers","following_url":"https://api.github.com/users/at15/following{/other_user}","gists_url":"https://api.github.com/users/at15/gists{/gist_id}","starred_url":"https://api.github.com/users/at15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at15/subscriptions","organizations_url":"https://api.github.com/users/at15/orgs","repos_url":"https://api.github.com/users/at15/repos","events_url":"https://api.github.com/users/at15/events{/privacy}","received_events_url":"https://api.github.com/users/at15/received_events","type":"User","site_admin":false},"labels":[{"id":393882074,"url":"https://api.github.com/repos/dyweb/Ayi/labels/refactor","name":"refactor","color":"1d76db","default":false},{"id":243289859,"url":"https://api.github.com/repos/dyweb/Ayi/labels/working","name":"working","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"at15","id":5621298,"avatar_url":"https://avatars.githubusercontent.com/u/5621298?v=3","gravatar_id":"","url":"https://api.github.com/users/at15","html_url":"https://github.com/at15","followers_url":"https://api.github.com/users/at15/followers","following_url":"https://api.github.com/users/at15/following{/other_user}","gists_url":"https://api.github.com/users/at15/gists{/gist_id}","starred_url":"https://api.github.com/users/at15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at15/subscriptions","organizations_url":"https://api.github.com/users/at15/orgs","repos_url":"https://api.github.com/users/at15/repos","events_url":"https://api.github.com/users/at15/events{/privacy}","received_events_url":"https://api.github.com/users/at15/received_events","type":"User","site_admin":false},"assignees":[{"login":"at15","id":5621298,"avatar_url":"https://avatars.githubusercontent.com/u/5621298?v=3","gravatar_id":"","url":"https://api.github.com/users/at15","html_url":"https://github.com/at15","followers_url":"https://api.github.com/users/at15/followers","following_url":"https://api.github.com/users/at15/following{/other_user}","gists_url":"https://api.github.com/users/at15/gists{/gist_id}","starred_url":"https://api.github.com/users/at15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at15/subscriptions","organizations_url":"https://api.github.com/users/at15/orgs","repos_url":"https://api.github.com/users/at15/repos","events_url":"https://api.github.com/users/at15/events{/privacy}","received_events_url":"https://api.github.com/users/at15/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dyweb/Ayi/milestones/2","html_url":"https://github.com/dyweb/Ayi/milestone/2","labels_url":"https://api.github.com/repos/dyweb/Ayi/milestones/2/labels","id":2211246,"number":2,"title":"0.0.4","description":"- common log\r\n- common runner\r\n- common data structure that go does not have\r\n- new runner which support context and run in background","creator":{"login":"at15","id":5621298,"avatar_url":"https://avatars.githubusercontent.com/u/5621298?v=3","gravatar_id":"","url":"https://api.github.com/users/at15","html_url":"https://github.com/at15","followers_url":"https://api.github.com/users/at15/followers","following_url":"https://api.github.com/users/at15/following{/other_user}","gists_url":"https://api.github.com/users/at15/gists{/gist_id}","starred_url":"https://api.github.com/users/at15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at15/subscriptions","organizations_url":"https://api.github.com/users/at15/orgs","repos_url":"https://api.github.com/users/at15/repos","events_url":"https://api.github.com/users/at15/events{/privacy}","received_events_url":"https://api.github.com/users/at15/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":1,"state":"open","created_at":"2016-12-22T03:38:38Z","updated_at":"2016-12-23T19:57:36Z","due_on":"2016-12-25T08:00:00Z","closed_at":null},"comments":5,"created_at":"2016-12-20T07:38:06Z","updated_at":"2016-12-31T02:54:23Z","closed_at":null,"body":"currently, only part of the runner code is in `util/runner`, also [command.go](https://github.com/dyweb/Ayi/blob/master/util/command.go) is coupled with `viper`,  and I plan to split it out like the log package #59, so it can be used in other projects.\r\n\r\n- [ ] move runner to `common/runner`, `app/runner` maybe better\r\n- [ ] support direct output to file, just ignore those tty stuff like `ls`\r\n- [ ] add standalone config && decouple viper\r\n- [ ] figure out #58 and #56, it happened a lot when I was using latex with Ayi and got some wrong syntax that cause latex error\r\n- [ ] auto register command from config\r\n  - cobra does not have command not found handler, it do return the error on https://github.com/spf13/cobra/blob/856b96dcb49d6427babe192998a35190a12c2230/command.go#L515 instead of just stop there, need to grab the code and have a look, may need to use a fork\r\n- [ ] add functionality like foreman, allow running things in background\r\n  - https://github.com/gdamore/govisor\r\n  - https://github.com/mattn/goreman\r\n  - https://github.com/ddollar/forego\r\n  - https://github.com/DarthSim/hivemind The mind to rule processes of your development environment\r\n  - may need a database to store more information https://github.com/boltdb/bolt\r\n- [ ] more expressive config \r\n  - pm2 http://pm2.keymetrics.io/docs/usage/quick-start/\r\n  - systemd https://coreos.com/docs/launching-containers/launching/getting-started-with-systemd/\r\n  - foreman https://github.com/ddollar/foreman it seems the foreman I used use in rails application is not https://www.theforeman.org/introduction.html which shows first in google search result\r\n- [ ] may consider using golang 1.7's new context feature \r\n   - not to be confused with the command line's context\r\n   - https://golang.org/pkg/context/\r\n   - https://medium.com/@cep21/how-to-correctly-use-context-context-in-go-1-7-8f2c0fafdf39#.293ia8d47"},"comment":{"url":"https://api.github.com/repos/dyweb/Ayi/issues/comments/269845390","html_url":"https://github.com/dyweb/Ayi/issues/63#issuecomment-269845390","issue_url":"https://api.github.com/repos/dyweb/Ayi/issues/63","id":269845390,"user":{"login":"at15","id":5621298,"avatar_url":"https://avatars.githubusercontent.com/u/5621298?v=3","gravatar_id":"","url":"https://api.github.com/users/at15","html_url":"https://github.com/at15","followers_url":"https://api.github.com/users/at15/followers","following_url":"https://api.github.com/users/at15/following{/other_user}","gists_url":"https://api.github.com/users/at15/gists{/gist_id}","starred_url":"https://api.github.com/users/at15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at15/subscriptions","organizations_url":"https://api.github.com/users/at15/orgs","repos_url":"https://api.github.com/users/at15/repos","events_url":"https://api.github.com/users/at15/events{/privacy}","received_events_url":"https://api.github.com/users/at15/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T02:54:23Z","updated_at":"2016-12-31T02:54:23Z","body":"Ansible provide a good example, http://docs.ansible.com/ansible/playbooks_intro.html\r\n\r\n````\r\ntasks:\r\n  - name: run this command and ignore the result\r\n    shell: /usr/bin/somecommand\r\n    ignore_errors: True\r\n````\r\n\r\nActually Ayi's intention is quite like Ansible"}}
{"actor":{"display_login":"at15"}}