{"action":"created","issue":{"url":"https://api.github.com/repos/mre/riffraff/issues/15","repository_url":"https://api.github.com/repos/mre/riffraff","labels_url":"https://api.github.com/repos/mre/riffraff/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/mre/riffraff/issues/15/comments","events_url":"https://api.github.com/repos/mre/riffraff/issues/15/events","html_url":"https://github.com/mre/riffraff/issues/15","id":368105266,"node_id":"MDU6SXNzdWUzNjgxMDUyNjY=","number":15,"title":"Add status icons for Jenkins nodes","user":{"login":"mre","id":175809,"node_id":"MDQ6VXNlcjE3NTgwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/175809?v=4","gravatar_id":"","url":"https://api.github.com/users/mre","html_url":"https://github.com/mre","followers_url":"https://api.github.com/users/mre/followers","following_url":"https://api.github.com/users/mre/following{/other_user}","gists_url":"https://api.github.com/users/mre/gists{/gist_id}","starred_url":"https://api.github.com/users/mre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mre/subscriptions","organizations_url":"https://api.github.com/users/mre/orgs","repos_url":"https://api.github.com/users/mre/repos","events_url":"https://api.github.com/users/mre/events{/privacy}","received_events_url":"https://api.github.com/users/mre/received_events","type":"User","site_admin":false},"labels":[{"id":860402634,"node_id":"MDU6TGFiZWw4NjA0MDI2MzQ=","url":"https://api.github.com/repos/mre/riffraff/labels/enhancement","name":"enhancement","color":"a2eeef","default":true},{"id":860402636,"node_id":"MDU6TGFiZWw4NjA0MDI2MzY=","url":"https://api.github.com/repos/mre/riffraff/labels/good%20first%20issue","name":"good first issue","color":"7057ff","default":true},{"id":1080523593,"node_id":"MDU6TGFiZWwxMDgwNTIzNTkz","url":"https://api.github.com/repos/mre/riffraff/labels/hacktoberfest","name":"hacktoberfest","color":"c5def5","default":false},{"id":860402635,"node_id":"MDU6TGFiZWw4NjA0MDI2MzU=","url":"https://api.github.com/repos/mre/riffraff/labels/help%20wanted","name":"help wanted","color":"008672","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-09T08:53:49Z","updated_at":"2018-10-09T10:41:46Z","closed_at":null,"author_association":"OWNER","body":"When running `riffraff status <my_job_name>`, we get a list of all jobs and an icon for their status:\r\n\r\n```\r\n? job1 (https://example.com/job/job1/)\r\n✓ job2 (https://example.com/job/job2/)\r\n✗ job3 (https://example.com/job/job3/)\r\n```\r\n\r\nThe same out put would be nice for `riffraff nodes`, but so far the icon is missing:\r\n\r\n```\r\njenkins1: Online\r\njenkins2: Online\r\njenkins3: Offline\r\njenkins4: Online\r\n```\r\n\r\nbut the output should be \r\n\r\n```\r\n✓ jenkins1: Online\r\n✓ jenkins2: Online\r\n✗ jenkins3: Offline\r\n✓ jenkins4: Online\r\n```\r\n\r\nThe easiest way to do it is to just copy and paste the code from the `status` command to the `nodes` command.\r\nA slightly cleaner way would be to have a `printStatus` command, which encapsulates the printing of the text and the icons.\r\nMaybe even better would be to define a custom log formatter, e.g. by using logrus. See example [here](https://github.com/sirupsen/logrus/issues/719).\r\n\r\nWould be nice if anyone wants to tackle that.\r\n"},"comment":{"url":"https://api.github.com/repos/mre/riffraff/issues/comments/428145141","html_url":"https://github.com/mre/riffraff/issues/15#issuecomment-428145141","issue_url":"https://api.github.com/repos/mre/riffraff/issues/15","id":428145141,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODE0NTE0MQ==","user":{"login":"mre","id":175809,"node_id":"MDQ6VXNlcjE3NTgwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/175809?v=4","gravatar_id":"","url":"https://api.github.com/users/mre","html_url":"https://github.com/mre","followers_url":"https://api.github.com/users/mre/followers","following_url":"https://api.github.com/users/mre/following{/other_user}","gists_url":"https://api.github.com/users/mre/gists{/gist_id}","starred_url":"https://api.github.com/users/mre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mre/subscriptions","organizations_url":"https://api.github.com/users/mre/orgs","repos_url":"https://api.github.com/users/mre/repos","events_url":"https://api.github.com/users/mre/events{/privacy}","received_events_url":"https://api.github.com/users/mre/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T10:41:46Z","updated_at":"2018-10-09T10:41:46Z","author_association":"OWNER","body":"Wanna reopen this one, as we could still improve the status output. Right now, we do the simplest thing, which is duplicating the logic in both the `status` and the `nodes` command. Would be nicer to add a custom log formatter as described in the original issue description above.\r\nAnyone wants to tackle that?"}}
{"actor":{"display_login":"mre"}}