{"action":"created","issue":{"url":"https://api.github.com/repos/motdotla/node-lambda/issues/99","repository_url":"https://api.github.com/repos/motdotla/node-lambda","labels_url":"https://api.github.com/repos/motdotla/node-lambda/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/motdotla/node-lambda/issues/99/comments","events_url":"https://api.github.com/repos/motdotla/node-lambda/issues/99/events","html_url":"https://github.com/motdotla/node-lambda/pull/99","id":153605410,"number":99,"title":"Verify env vars before create sample files","user":{"login":"tallesh","id":2508107,"avatar_url":"https://avatars.githubusercontent.com/u/2508107?v=3","gravatar_id":"","url":"https://api.github.com/users/tallesh","html_url":"https://github.com/tallesh","followers_url":"https://api.github.com/users/tallesh/followers","following_url":"https://api.github.com/users/tallesh/following{/other_user}","gists_url":"https://api.github.com/users/tallesh/gists{/gist_id}","starred_url":"https://api.github.com/users/tallesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tallesh/subscriptions","organizations_url":"https://api.github.com/users/tallesh/orgs","repos_url":"https://api.github.com/users/tallesh/repos","events_url":"https://api.github.com/users/tallesh/events{/privacy}","received_events_url":"https://api.github.com/users/tallesh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-07T17:03:57Z","updated_at":"2016-05-12T09:58:48Z","closed_at":"2016-05-12T09:42:01Z","pull_request":{"url":"https://api.github.com/repos/motdotla/node-lambda/pulls/99","html_url":"https://github.com/motdotla/node-lambda/pull/99","diff_url":"https://github.com/motdotla/node-lambda/pull/99.diff","patch_url":"https://github.com/motdotla/node-lambda/pull/99.patch"},"body":"\r\n**This patch force node-lambda first look into env vars before create sampleFiles (context.json and event.json)**\r\n\r\nPreviously, every time **node-lambda run** was  executed, a **event.json** file was created even if  the **-j** parameter was informed, for example after execute:\r\n\r\n`node-lambda run --handler test.handler -j test.json`\r\n\r\nThe event.json file would be unnecessarily created and the test.json file would not be created. The same logic occurs if the EVENT_FILE var was defined.\r\n\r\nTo correct it, this code force node-lambda first look into env vars before create sampleFiles (context.json and event.json)."},"comment":{"url":"https://api.github.com/repos/motdotla/node-lambda/issues/comments/218712756","html_url":"https://github.com/motdotla/node-lambda/pull/99#issuecomment-218712756","issue_url":"https://api.github.com/repos/motdotla/node-lambda/issues/99","id":218712756,"user":{"login":"DeviaVir","id":777823,"avatar_url":"https://avatars.githubusercontent.com/u/777823?v=3","gravatar_id":"","url":"https://api.github.com/users/DeviaVir","html_url":"https://github.com/DeviaVir","followers_url":"https://api.github.com/users/DeviaVir/followers","following_url":"https://api.github.com/users/DeviaVir/following{/other_user}","gists_url":"https://api.github.com/users/DeviaVir/gists{/gist_id}","starred_url":"https://api.github.com/users/DeviaVir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeviaVir/subscriptions","organizations_url":"https://api.github.com/users/DeviaVir/orgs","repos_url":"https://api.github.com/users/DeviaVir/repos","events_url":"https://api.github.com/users/DeviaVir/events{/privacy}","received_events_url":"https://api.github.com/users/DeviaVir/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T09:58:48Z","updated_at":"2016-05-12T09:58:48Z","body":"This has been added to [0.8.2](https://github.com/motdotla/node-lambda/pull/103) which has been released on NPM as the latest version, thanks again for your contribution! 🎊 "}}