{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments/55948642","id":55948642,"diff_hunk":"@@ -41,6 +41,27 @@ public virtual bool TryCreate(FunctionMetadata functionMetadata, out FunctionDes\n                 return false;\n             }\n \n+            // Default the trigger binding name if a name hasn't\n+            // been specified\n+            // TODO: Remove this logic and always require it to be explicitly\n+            // specified?\n+            foreach (var binding in functionMetadata.Bindings.Where(p => p.IsTrigger))\n+            {\n+                string triggerParameterName = binding.Name;\n+                bool triggerNameSpecified = true;\n+                if (string.IsNullOrEmpty(triggerParameterName))\n+                {\n+                    // default the name to simply 'input'\n+                    binding.Name = triggerParameterName = \"input\";\n+                    triggerNameSpecified = false;\n+                }\n+\n+                if (!triggerNameSpecified && binding.Type == BindingType.HttpTrigger)","path":"src/WebJobs.Script/Description/FunctionDescriptorProvider.cs","position":19,"original_position":19,"commit_id":"32c4d7277c5c7ec860185a4b74e210db86eaef29","original_commit_id":"32c4d7277c5c7ec860185a4b74e210db86eaef29","user":{"login":"davidebbo","id":556238,"avatar_url":"https://avatars.githubusercontent.com/u/556238?v=3","gravatar_id":"","url":"https://api.github.com/users/davidebbo","html_url":"https://github.com/davidebbo","followers_url":"https://api.github.com/users/davidebbo/followers","following_url":"https://api.github.com/users/davidebbo/following{/other_user}","gists_url":"https://api.github.com/users/davidebbo/gists{/gist_id}","starred_url":"https://api.github.com/users/davidebbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidebbo/subscriptions","organizations_url":"https://api.github.com/users/davidebbo/orgs","repos_url":"https://api.github.com/users/davidebbo/repos","events_url":"https://api.github.com/users/davidebbo/events{/privacy}","received_events_url":"https://api.github.com/users/davidebbo/received_events","type":"User","site_admin":false},"body":"This `if` block in non-obvious and could use an explanatory comment.","created_at":"2016-03-14T01:27:39Z","updated_at":"2016-03-14T01:27:39Z","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/96#discussion_r55948642","pull_request_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/96","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments/55948642"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-script/pull/96#discussion_r55948642"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/96"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/96","id":62678738,"html_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/96","diff_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/96.diff","patch_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/96.patch","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/96","number":96,"state":"open","locked":false,"title":"Refactoring/Fixing Script binding pipeline","user":{"login":"mathewc","id":1056548,"avatar_url":"https://avatars.githubusercontent.com/u/1056548?v=3","gravatar_id":"","url":"https://api.github.com/users/mathewc","html_url":"https://github.com/mathewc","followers_url":"https://api.github.com/users/mathewc/followers","following_url":"https://api.github.com/users/mathewc/following{/other_user}","gists_url":"https://api.github.com/users/mathewc/gists{/gist_id}","starred_url":"https://api.github.com/users/mathewc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathewc/subscriptions","organizations_url":"https://api.github.com/users/mathewc/orgs","repos_url":"https://api.github.com/users/mathewc/repos","events_url":"https://api.github.com/users/mathewc/events{/privacy}","received_events_url":"https://api.github.com/users/mathewc/received_events","type":"User","site_admin":false},"body":"This work addresses https://github.com/Azure/azure-webjobs-sdk-script/issues/82.\r\n\r\nWhen trying to refactor the ResizeImage sample to use a blob trigger input directly (rather than intermediate queue), we discovered shortcomings in the binding pipeline. Specifically, we weren't treating trigger inputs the same as all other in/out bindings. For all other bindings, we make them available as **environment variables** that the script can used, which are backed by temp files. For scenarios like ResizeImage this is important - the script needs a file path, not the image data directly.\r\n\r\nSo I've removed the pattern of passing trigger input in via STDIN. All in/out bindings now use the same consistent temp file mechanism. This is much more flexible as well, since bindings (e.g. Blob) can just stream the bytes to file and leave interpretation and reading/streaming up to the script. I've updated all the various language samples to read the temp file rather than STDIN.\r\n\r\nI've also added more end to end tests that verify these scenarios. The refactored ResizeImage sample now works swimingly :) All the non-Node/C# templates will have to be updated accordingly as well.","created_at":"2016-03-13T18:31:41Z","updated_at":"2016-03-14T01:27:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4fd156c7e9cfce45f503f1bb30a9894b6a384d2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/96/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/96/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/96/comments","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/32c4d7277c5c7ec860185a4b74e210db86eaef29","head":{"label":"Azure:mathewc-work","ref":"mathewc-work","sha":"32c4d7277c5c7ec860185a4b74e210db86eaef29","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":42548553,"name":"azure-webjobs-sdk-script","full_name":"Azure/azure-webjobs-sdk-script","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-webjobs-sdk-script","description":"Scripting the Azure WebJobs SDK","fork":false,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script","forks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/forks","keys_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/teams","hooks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/events","assignees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/tags","blobs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscription","commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/merges","archive_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/downloads","issues_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/deployments","created_at":"2015-09-15T21:48:19Z","updated_at":"2016-03-12T19:46:08Z","pushed_at":"2016-03-13T19:30:55Z","git_url":"git://github.com/Azure/azure-webjobs-sdk-script.git","ssh_url":"git@github.com:Azure/azure-webjobs-sdk-script.git","clone_url":"https://github.com/Azure/azure-webjobs-sdk-script.git","svn_url":"https://github.com/Azure/azure-webjobs-sdk-script","homepage":"","size":14218,"stargazers_count":18,"watchers_count":18,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":26,"forks":12,"open_issues":26,"watchers":18,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"c3fcdd1bbbc4afcd62b837837668d887345c9355","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":42548553,"name":"azure-webjobs-sdk-script","full_name":"Azure/azure-webjobs-sdk-script","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-webjobs-sdk-script","description":"Scripting the Azure WebJobs SDK","fork":false,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script","forks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/forks","keys_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/teams","hooks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/events","assignees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/tags","blobs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscription","commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/merges","archive_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/downloads","issues_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/deployments","created_at":"2015-09-15T21:48:19Z","updated_at":"2016-03-12T19:46:08Z","pushed_at":"2016-03-13T19:30:55Z","git_url":"git://github.com/Azure/azure-webjobs-sdk-script.git","ssh_url":"git@github.com:Azure/azure-webjobs-sdk-script.git","clone_url":"https://github.com/Azure/azure-webjobs-sdk-script.git","svn_url":"https://github.com/Azure/azure-webjobs-sdk-script","homepage":"","size":14218,"stargazers_count":18,"watchers_count":18,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":26,"forks":12,"open_issues":26,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/96"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-script/pull/96"},"issue":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/96"},"comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/32c4d7277c5c7ec860185a4b74e210db86eaef29"}}}}