{"action":"created","comment":{"url":"https://api.github.com/repos/punchcard-cms/content-types/pulls/comments/64441408","id":64441408,"diff_hunk":"@@ -60,6 +67,13 @@ const squish = (types) => {\n         plugin.id = attribute.id;\n         plugin.type = attribute.type;\n \n+        // Set Default Label from Plugin Name\n+        if (Object.keys(plugin.inputs).length === 1) {\n+          const input = Object.keys(plugin.inputs)[0];\n+\n+          plugin.inputs[input].label = plugin.name;","path":"lib/content-types/merge.js","position":52,"original_position":52,"commit_id":"31a245182970b0ba00ce9382dc343d5c89806361","original_commit_id":"31a245182970b0ba00ce9382dc343d5c89806361","user":{"login":"Snugug","id":377188,"avatar_url":"https://avatars.githubusercontent.com/u/377188?v=3","gravatar_id":"","url":"https://api.github.com/users/Snugug","html_url":"https://github.com/Snugug","followers_url":"https://api.github.com/users/Snugug/followers","following_url":"https://api.github.com/users/Snugug/following{/other_user}","gists_url":"https://api.github.com/users/Snugug/gists{/gist_id}","starred_url":"https://api.github.com/users/Snugug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snugug/subscriptions","organizations_url":"https://api.github.com/users/Snugug/orgs","repos_url":"https://api.github.com/users/Snugug/repos","events_url":"https://api.github.com/users/Snugug/events{/privacy}","received_events_url":"https://api.github.com/users/Snugug/received_events","type":"User","site_admin":false},"body":"This is the merge. If someone configured an input plugin, and there is only one input, the name they give the configuration should be used as the label if one isn't passed.\r\n\r\n```yaml\r\nname: Foo\r\nattributes:\r\n  - name: My Awesome Text Input\r\n    type: text\r\n```\r\n\r\nThat'll result in `My Awesome Text Input` being the label. You'll notice on line 62 that the plugin name is overridden with the attribute name.","created_at":"2016-05-24T17:50:07Z","updated_at":"2016-05-24T17:50:07Z","html_url":"https://github.com/punchcard-cms/content-types/pull/9#discussion_r64441408","pull_request_url":"https://api.github.com/repos/punchcard-cms/content-types/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/punchcard-cms/content-types/pulls/comments/64441408"},"html":{"href":"https://github.com/punchcard-cms/content-types/pull/9#discussion_r64441408"},"pull_request":{"href":"https://api.github.com/repos/punchcard-cms/content-types/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/punchcard-cms/content-types/pulls/9","id":71255736,"html_url":"https://github.com/punchcard-cms/content-types/pull/9","diff_url":"https://github.com/punchcard-cms/content-types/pull/9.diff","patch_url":"https://github.com/punchcard-cms/content-types/pull/9.patch","issue_url":"https://api.github.com/repos/punchcard-cms/content-types/issues/9","number":9,"state":"open","locked":false,"title":"Labels, Names, and Tests","user":{"login":"Snugug","id":377188,"avatar_url":"https://avatars.githubusercontent.com/u/377188?v=3","gravatar_id":"","url":"https://api.github.com/users/Snugug","html_url":"https://github.com/Snugug","followers_url":"https://api.github.com/users/Snugug/followers","following_url":"https://api.github.com/users/Snugug/following{/other_user}","gists_url":"https://api.github.com/users/Snugug/gists{/gist_id}","starred_url":"https://api.github.com/users/Snugug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snugug/subscriptions","organizations_url":"https://api.github.com/users/Snugug/orgs","repos_url":"https://api.github.com/users/Snugug/repos","events_url":"https://api.github.com/users/Snugug/events{/privacy}","received_events_url":"https://api.github.com/users/Snugug/received_events","type":"User","site_admin":false},"body":"* Fix Default Label from Plugin\r\n* Fix Object Reference Bug\r\n* Update Name for inputs\r\n* Require kebab case for IDs\r\n* Clean up error messages","created_at":"2016-05-24T16:54:22Z","updated_at":"2016-05-24T17:50:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"301617558875e8580ed2e0271b10bfcee584cf54","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/punchcard-cms/content-types/pulls/9/commits","review_comments_url":"https://api.github.com/repos/punchcard-cms/content-types/pulls/9/comments","review_comment_url":"https://api.github.com/repos/punchcard-cms/content-types/pulls/comments{/number}","comments_url":"https://api.github.com/repos/punchcard-cms/content-types/issues/9/comments","statuses_url":"https://api.github.com/repos/punchcard-cms/content-types/statuses/31a245182970b0ba00ce9382dc343d5c89806361","head":{"label":"punchcard-cms:validation","ref":"validation","sha":"31a245182970b0ba00ce9382dc343d5c89806361","user":{"login":"punchcard-cms","id":18744098,"avatar_url":"https://avatars.githubusercontent.com/u/18744098?v=3","gravatar_id":"","url":"https://api.github.com/users/punchcard-cms","html_url":"https://github.com/punchcard-cms","followers_url":"https://api.github.com/users/punchcard-cms/followers","following_url":"https://api.github.com/users/punchcard-cms/following{/other_user}","gists_url":"https://api.github.com/users/punchcard-cms/gists{/gist_id}","starred_url":"https://api.github.com/users/punchcard-cms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punchcard-cms/subscriptions","organizations_url":"https://api.github.com/users/punchcard-cms/orgs","repos_url":"https://api.github.com/users/punchcard-cms/repos","events_url":"https://api.github.com/users/punchcard-cms/events{/privacy}","received_events_url":"https://api.github.com/users/punchcard-cms/received_events","type":"Organization","site_admin":false},"repo":{"id":58765122,"name":"content-types","full_name":"punchcard-cms/content-types","owner":{"login":"punchcard-cms","id":18744098,"avatar_url":"https://avatars.githubusercontent.com/u/18744098?v=3","gravatar_id":"","url":"https://api.github.com/users/punchcard-cms","html_url":"https://github.com/punchcard-cms","followers_url":"https://api.github.com/users/punchcard-cms/followers","following_url":"https://api.github.com/users/punchcard-cms/following{/other_user}","gists_url":"https://api.github.com/users/punchcard-cms/gists{/gist_id}","starred_url":"https://api.github.com/users/punchcard-cms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punchcard-cms/subscriptions","organizations_url":"https://api.github.com/users/punchcard-cms/orgs","repos_url":"https://api.github.com/users/punchcard-cms/repos","events_url":"https://api.github.com/users/punchcard-cms/events{/privacy}","received_events_url":"https://api.github.com/users/punchcard-cms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/punchcard-cms/content-types","description":"","fork":false,"url":"https://api.github.com/repos/punchcard-cms/content-types","forks_url":"https://api.github.com/repos/punchcard-cms/content-types/forks","keys_url":"https://api.github.com/repos/punchcard-cms/content-types/keys{/key_id}","collaborators_url":"https://api.github.com/repos/punchcard-cms/content-types/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/punchcard-cms/content-types/teams","hooks_url":"https://api.github.com/repos/punchcard-cms/content-types/hooks","issue_events_url":"https://api.github.com/repos/punchcard-cms/content-types/issues/events{/number}","events_url":"https://api.github.com/repos/punchcard-cms/content-types/events","assignees_url":"https://api.github.com/repos/punchcard-cms/content-types/assignees{/user}","branches_url":"https://api.github.com/repos/punchcard-cms/content-types/branches{/branch}","tags_url":"https://api.github.com/repos/punchcard-cms/content-types/tags","blobs_url":"https://api.github.com/repos/punchcard-cms/content-types/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/punchcard-cms/content-types/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/punchcard-cms/content-types/git/refs{/sha}","trees_url":"https://api.github.com/repos/punchcard-cms/content-types/git/trees{/sha}","statuses_url":"https://api.github.com/repos/punchcard-cms/content-types/statuses/{sha}","languages_url":"https://api.github.com/repos/punchcard-cms/content-types/languages","stargazers_url":"https://api.github.com/repos/punchcard-cms/content-types/stargazers","contributors_url":"https://api.github.com/repos/punchcard-cms/content-types/contributors","subscribers_url":"https://api.github.com/repos/punchcard-cms/content-types/subscribers","subscription_url":"https://api.github.com/repos/punchcard-cms/content-types/subscription","commits_url":"https://api.github.com/repos/punchcard-cms/content-types/commits{/sha}","git_commits_url":"https://api.github.com/repos/punchcard-cms/content-types/git/commits{/sha}","comments_url":"https://api.github.com/repos/punchcard-cms/content-types/comments{/number}","issue_comment_url":"https://api.github.com/repos/punchcard-cms/content-types/issues/comments{/number}","contents_url":"https://api.github.com/repos/punchcard-cms/content-types/contents/{+path}","compare_url":"https://api.github.com/repos/punchcard-cms/content-types/compare/{base}...{head}","merges_url":"https://api.github.com/repos/punchcard-cms/content-types/merges","archive_url":"https://api.github.com/repos/punchcard-cms/content-types/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/punchcard-cms/content-types/downloads","issues_url":"https://api.github.com/repos/punchcard-cms/content-types/issues{/number}","pulls_url":"https://api.github.com/repos/punchcard-cms/content-types/pulls{/number}","milestones_url":"https://api.github.com/repos/punchcard-cms/content-types/milestones{/number}","notifications_url":"https://api.github.com/repos/punchcard-cms/content-types/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/punchcard-cms/content-types/labels{/name}","releases_url":"https://api.github.com/repos/punchcard-cms/content-types/releases{/id}","deployments_url":"https://api.github.com/repos/punchcard-cms/content-types/deployments","created_at":"2016-05-13T18:55:38Z","updated_at":"2016-05-14T12:10:57Z","pushed_at":"2016-05-24T16:54:23Z","git_url":"git://github.com/punchcard-cms/content-types.git","ssh_url":"git@github.com:punchcard-cms/content-types.git","clone_url":"https://github.com/punchcard-cms/content-types.git","svn_url":"https://github.com/punchcard-cms/content-types","homepage":null,"size":37,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"punchcard-cms:master","ref":"master","sha":"09fd0ad7fedd31923b05e9e88886f404784f0a24","user":{"login":"punchcard-cms","id":18744098,"avatar_url":"https://avatars.githubusercontent.com/u/18744098?v=3","gravatar_id":"","url":"https://api.github.com/users/punchcard-cms","html_url":"https://github.com/punchcard-cms","followers_url":"https://api.github.com/users/punchcard-cms/followers","following_url":"https://api.github.com/users/punchcard-cms/following{/other_user}","gists_url":"https://api.github.com/users/punchcard-cms/gists{/gist_id}","starred_url":"https://api.github.com/users/punchcard-cms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punchcard-cms/subscriptions","organizations_url":"https://api.github.com/users/punchcard-cms/orgs","repos_url":"https://api.github.com/users/punchcard-cms/repos","events_url":"https://api.github.com/users/punchcard-cms/events{/privacy}","received_events_url":"https://api.github.com/users/punchcard-cms/received_events","type":"Organization","site_admin":false},"repo":{"id":58765122,"name":"content-types","full_name":"punchcard-cms/content-types","owner":{"login":"punchcard-cms","id":18744098,"avatar_url":"https://avatars.githubusercontent.com/u/18744098?v=3","gravatar_id":"","url":"https://api.github.com/users/punchcard-cms","html_url":"https://github.com/punchcard-cms","followers_url":"https://api.github.com/users/punchcard-cms/followers","following_url":"https://api.github.com/users/punchcard-cms/following{/other_user}","gists_url":"https://api.github.com/users/punchcard-cms/gists{/gist_id}","starred_url":"https://api.github.com/users/punchcard-cms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punchcard-cms/subscriptions","organizations_url":"https://api.github.com/users/punchcard-cms/orgs","repos_url":"https://api.github.com/users/punchcard-cms/repos","events_url":"https://api.github.com/users/punchcard-cms/events{/privacy}","received_events_url":"https://api.github.com/users/punchcard-cms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/punchcard-cms/content-types","description":"","fork":false,"url":"https://api.github.com/repos/punchcard-cms/content-types","forks_url":"https://api.github.com/repos/punchcard-cms/content-types/forks","keys_url":"https://api.github.com/repos/punchcard-cms/content-types/keys{/key_id}","collaborators_url":"https://api.github.com/repos/punchcard-cms/content-types/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/punchcard-cms/content-types/teams","hooks_url":"https://api.github.com/repos/punchcard-cms/content-types/hooks","issue_events_url":"https://api.github.com/repos/punchcard-cms/content-types/issues/events{/number}","events_url":"https://api.github.com/repos/punchcard-cms/content-types/events","assignees_url":"https://api.github.com/repos/punchcard-cms/content-types/assignees{/user}","branches_url":"https://api.github.com/repos/punchcard-cms/content-types/branches{/branch}","tags_url":"https://api.github.com/repos/punchcard-cms/content-types/tags","blobs_url":"https://api.github.com/repos/punchcard-cms/content-types/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/punchcard-cms/content-types/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/punchcard-cms/content-types/git/refs{/sha}","trees_url":"https://api.github.com/repos/punchcard-cms/content-types/git/trees{/sha}","statuses_url":"https://api.github.com/repos/punchcard-cms/content-types/statuses/{sha}","languages_url":"https://api.github.com/repos/punchcard-cms/content-types/languages","stargazers_url":"https://api.github.com/repos/punchcard-cms/content-types/stargazers","contributors_url":"https://api.github.com/repos/punchcard-cms/content-types/contributors","subscribers_url":"https://api.github.com/repos/punchcard-cms/content-types/subscribers","subscription_url":"https://api.github.com/repos/punchcard-cms/content-types/subscription","commits_url":"https://api.github.com/repos/punchcard-cms/content-types/commits{/sha}","git_commits_url":"https://api.github.com/repos/punchcard-cms/content-types/git/commits{/sha}","comments_url":"https://api.github.com/repos/punchcard-cms/content-types/comments{/number}","issue_comment_url":"https://api.github.com/repos/punchcard-cms/content-types/issues/comments{/number}","contents_url":"https://api.github.com/repos/punchcard-cms/content-types/contents/{+path}","compare_url":"https://api.github.com/repos/punchcard-cms/content-types/compare/{base}...{head}","merges_url":"https://api.github.com/repos/punchcard-cms/content-types/merges","archive_url":"https://api.github.com/repos/punchcard-cms/content-types/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/punchcard-cms/content-types/downloads","issues_url":"https://api.github.com/repos/punchcard-cms/content-types/issues{/number}","pulls_url":"https://api.github.com/repos/punchcard-cms/content-types/pulls{/number}","milestones_url":"https://api.github.com/repos/punchcard-cms/content-types/milestones{/number}","notifications_url":"https://api.github.com/repos/punchcard-cms/content-types/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/punchcard-cms/content-types/labels{/name}","releases_url":"https://api.github.com/repos/punchcard-cms/content-types/releases{/id}","deployments_url":"https://api.github.com/repos/punchcard-cms/content-types/deployments","created_at":"2016-05-13T18:55:38Z","updated_at":"2016-05-14T12:10:57Z","pushed_at":"2016-05-24T16:54:23Z","git_url":"git://github.com/punchcard-cms/content-types.git","ssh_url":"git@github.com:punchcard-cms/content-types.git","clone_url":"https://github.com/punchcard-cms/content-types.git","svn_url":"https://github.com/punchcard-cms/content-types","homepage":null,"size":37,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/punchcard-cms/content-types/pulls/9"},"html":{"href":"https://github.com/punchcard-cms/content-types/pull/9"},"issue":{"href":"https://api.github.com/repos/punchcard-cms/content-types/issues/9"},"comments":{"href":"https://api.github.com/repos/punchcard-cms/content-types/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/punchcard-cms/content-types/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/punchcard-cms/content-types/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/punchcard-cms/content-types/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/punchcard-cms/content-types/statuses/31a245182970b0ba00ce9382dc343d5c89806361"}}}}
{"actor":{"display_login":"Snugug"}}