{"action":"created","issue":{"url":"https://api.github.com/repos/craftyguy/networkd-dispatcher/issues/7","repository_url":"https://api.github.com/repos/craftyguy/networkd-dispatcher","labels_url":"https://api.github.com/repos/craftyguy/networkd-dispatcher/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/craftyguy/networkd-dispatcher/issues/7/comments","events_url":"https://api.github.com/repos/craftyguy/networkd-dispatcher/issues/7/events","html_url":"https://github.com/craftyguy/networkd-dispatcher/pull/7","id":222560641,"number":7,"title":"Simplify data structure: All elements are lists except for known singletons","user":{"login":"charles-dyfis-net","id":22370,"avatar_url":"https://avatars3.githubusercontent.com/u/22370?v=3","gravatar_id":"","url":"https://api.github.com/users/charles-dyfis-net","html_url":"https://github.com/charles-dyfis-net","followers_url":"https://api.github.com/users/charles-dyfis-net/followers","following_url":"https://api.github.com/users/charles-dyfis-net/following{/other_user}","gists_url":"https://api.github.com/users/charles-dyfis-net/gists{/gist_id}","starred_url":"https://api.github.com/users/charles-dyfis-net/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charles-dyfis-net/subscriptions","organizations_url":"https://api.github.com/users/charles-dyfis-net/orgs","repos_url":"https://api.github.com/users/charles-dyfis-net/repos","events_url":"https://api.github.com/users/charles-dyfis-net/events{/privacy}","received_events_url":"https://api.github.com/users/charles-dyfis-net/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-04-18T22:11:19Z","updated_at":"2017-04-19T14:56:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/craftyguy/networkd-dispatcher/pulls/7","html_url":"https://github.com/craftyguy/networkd-dispatcher/pull/7","diff_url":"https://github.com/craftyguy/networkd-dispatcher/pull/7.diff","patch_url":"https://github.com/craftyguy/networkd-dispatcher/pull/7.patch"},"body":"Prior to this change, runtime inspection was necessary to determine whether any item that could potentially hold either one item or more than one items contained a list or a lone element.\r\n\r\nWith this change, all items not listed in the `SINGLETONS` variable are parsed into lists, thus making the exported `json` environment variable easier to use, and reducing code complexity around the Address list."},"comment":{"url":"https://api.github.com/repos/craftyguy/networkd-dispatcher/issues/comments/295299142","html_url":"https://github.com/craftyguy/networkd-dispatcher/pull/7#issuecomment-295299142","issue_url":"https://api.github.com/repos/craftyguy/networkd-dispatcher/issues/7","id":295299142,"user":{"login":"charles-dyfis-net","id":22370,"avatar_url":"https://avatars3.githubusercontent.com/u/22370?v=3","gravatar_id":"","url":"https://api.github.com/users/charles-dyfis-net","html_url":"https://github.com/charles-dyfis-net","followers_url":"https://api.github.com/users/charles-dyfis-net/followers","following_url":"https://api.github.com/users/charles-dyfis-net/following{/other_user}","gists_url":"https://api.github.com/users/charles-dyfis-net/gists{/gist_id}","starred_url":"https://api.github.com/users/charles-dyfis-net/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charles-dyfis-net/subscriptions","organizations_url":"https://api.github.com/users/charles-dyfis-net/orgs","repos_url":"https://api.github.com/users/charles-dyfis-net/repos","events_url":"https://api.github.com/users/charles-dyfis-net/events{/privacy}","received_events_url":"https://api.github.com/users/charles-dyfis-net/received_events","type":"User","site_admin":false},"created_at":"2017-04-19T14:56:58Z","updated_at":"2017-04-19T14:56:58Z","body":"As an example use case, by the way -- with this change, using `resolvconf` (instead of systemd-resolver) can be as simple as:\r\n\r\n    #!/bin/env bash\r\n    jq -r '.DNS[] | (\"nameserver \" + .)' <<<\"$json\" | resolvconf -a \"$IFACE\"\r\n\r\nOtherwise, it would need to be something more like:\r\n\r\n    #!/usr/bin/env bash\r\n    jq -r '.DNS | if type == \"array\" then .[] else . end | (\"nameserver \" + .)' <<<\"$json\" \\\r\n      | resolvconf -a \"$IFACE\"\r\n\r\nwhich admittedly isn't *too* much of a mouthful, but requires using newer, less-well-known jq functionality."}}
{"actor":{"display_login":"charles-dyfis-net"}}