{"action":"created","comment":{"url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/comments/237551614","pull_request_review_id":179878279,"id":237551614,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzU1MTYxNA==","diff_hunk":"@@ -114,4 +118,28 @@ fun List<Parameter>.mergeRemoteParameters(remoteParameters: List<software.amazon\n             mutableParameter.setDefaultValue(it.parameterValue())\n         }\n         mutableParameter\n-    }.toList()\n\\ No newline at end of file\n+    }.toList()\n+\n+/**\n+ * Validate whether the specified template is supported for deployment to AWS.\n+ *\n+ * @return null if it is supported, or an error message otherwise.\n+ */\n+fun Project.canDeployOrError(path: String): String? {\n+    val indexedFunctions = CloudFormationTemplateIndex\n+        .listFunctions(this)\n+        .asSequence()\n+        .filter { it.path == path }\n+        .takeIf { it.count() != 0 } ?: return message(\"serverless.application.deploy.error.no_functions_defined\", path)\n+\n+    return indexedFunctions.mapNotNull {\n+        Runtime.fromValue(it.runtime()).validOrNull?.let { runtime ->\n+            runtime.runtimeGroup?.let { runtimeGroup ->\n+                if (runtimeGroup.supportSamBuild()) return@mapNotNull null\n+                else message(\"serverless.application.deploy.error.unsupported_runtime_group\", runtime.toString(), path)\n+            } ?: message(\"serverless.application.deploy.error.invalid_runtime_group\", runtime.toString(), path)\n+        } ?: message(\"serverless.application.deploy.error.invalid_runtime\", it.runtime() ?: \"empty runtime\", path)","path":"jetbrains-core/src/software/aws/toolkits/jetbrains/services/cloudformation/CloudFormationTemplate.kt","position":38,"original_position":38,"commit_id":"231a6a2471ea78a87b5c3f39dee8366c0bfd5a3e","original_commit_id":"231a6a2471ea78a87b5c3f39dee8366c0bfd5a3e","user":{"login":"awschristou","id":39839589,"node_id":"MDQ6VXNlcjM5ODM5NTg5","avatar_url":"https://avatars0.githubusercontent.com/u/39839589?v=4","gravatar_id":"","url":"https://api.github.com/users/awschristou","html_url":"https://github.com/awschristou","followers_url":"https://api.github.com/users/awschristou/followers","following_url":"https://api.github.com/users/awschristou/following{/other_user}","gists_url":"https://api.github.com/users/awschristou/gists{/gist_id}","starred_url":"https://api.github.com/users/awschristou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awschristou/subscriptions","organizations_url":"https://api.github.com/users/awschristou/orgs","repos_url":"https://api.github.com/users/awschristou/repos","events_url":"https://api.github.com/users/awschristou/events{/privacy}","received_events_url":"https://api.github.com/users/awschristou/received_events","type":"User","site_admin":false},"body":"`empty runtime` should be localized","created_at":"2018-11-29T16:09:33Z","updated_at":"2018-11-29T16:33:17Z","html_url":"https://github.com/aws/aws-toolkit-jetbrains/pull/639#discussion_r237551614","pull_request_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/639","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/comments/237551614"},"html":{"href":"https://github.com/aws/aws-toolkit-jetbrains/pull/639#discussion_r237551614"},"pull_request":{"href":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/639"}}},"pull_request":{"url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/639","id":234488899,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NDg4ODk5","html_url":"https://github.com/aws/aws-toolkit-jetbrains/pull/639","diff_url":"https://github.com/aws/aws-toolkit-jetbrains/pull/639.diff","patch_url":"https://github.com/aws/aws-toolkit-jetbrains/pull/639.patch","issue_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/issues/639","number":639,"state":"open","locked":false,"title":"Validate SAM template before deploy for unsupported runtime and add c…","user":{"login":"zhangzhx","id":7167513,"node_id":"MDQ6VXNlcjcxNjc1MTM=","avatar_url":"https://avatars3.githubusercontent.com/u/7167513?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangzhx","html_url":"https://github.com/zhangzhx","followers_url":"https://api.github.com/users/zhangzhx/followers","following_url":"https://api.github.com/users/zhangzhx/following{/other_user}","gists_url":"https://api.github.com/users/zhangzhx/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangzhx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangzhx/subscriptions","organizations_url":"https://api.github.com/users/zhangzhx/orgs","repos_url":"https://api.github.com/users/zhangzhx/repos","events_url":"https://api.github.com/users/zhangzhx/events{/privacy}","received_events_url":"https://api.github.com/users/zhangzhx/received_events","type":"User","site_admin":false},"body":"…reate lambda action in gutter icons\r\n\r\n<!--- Provide a general summary of your changes in the Title above -->\r\n1. Pop up an error notification when the target template has runtime not supported to build\r\n1. For Lambda handlers in the source code, if they are defined in SAM template which is not deployable, the `Create Lambda Function` action will be added to the gutter icon.\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n\r\n## Related Issue(s)\r\n<!--- What is the related issue you are trying to fix? -->\r\n#521 \r\n\r\n## Screenshots (if appropriate)\r\n<img width=\"1278\" alt=\"screen shot 2018-11-28 at 6 23 37 pm\" src=\"https://user-images.githubusercontent.com/7167513/49195255-25f17000-f33b-11e8-9b42-2c42211ff29f.png\">\r\n\r\n\r\n## Checklist\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] I have read the **README** document\r\n- [x] I have read the **CONTRIBUTING** document\r\n- [x] Local run of `gradlew check` succeeds\r\n- [x] My code follows the code style of this project\r\n- [x] I have added tests to cover my changes\r\n- [x] All new and existing tests passed\r\n- [x] A short description of the change has been added to the **CHANGELOG**\r\n\r\n## License\r\nI confirm that my contribution is made under the terms of the Apache 2.0 license.\r\n","created_at":"2018-11-29T02:31:44Z","updated_at":"2018-11-29T16:33:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7023fa1cf873583cc79f58826c8960538253d182","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/639/commits","review_comments_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/639/comments","review_comment_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/issues/639/comments","statuses_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/statuses/231a6a2471ea78a87b5c3f39dee8366c0bfd5a3e","head":{"label":"aws:zhaoxiz-hideDeployInUnsupportedRuntime","ref":"zhaoxiz-hideDeployInUnsupportedRuntime","sha":"231a6a2471ea78a87b5c3f39dee8366c0bfd5a3e","user":{"login":"aws","id":2232217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzIyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"repo":{"id":91485909,"node_id":"MDEwOlJlcG9zaXRvcnk5MTQ4NTkwOQ==","name":"aws-toolkit-jetbrains","full_name":"aws/aws-toolkit-jetbrains","private":false,"owner":{"login":"aws","id":2232217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzIyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/aws/aws-toolkit-jetbrains","description":"AWS Toolkit for JetBrains - a plugin for interacting with AWS from JetBrains IDEs","fork":false,"url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains","forks_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/forks","keys_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/teams","hooks_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/hooks","issue_events_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/issues/events{/number}","events_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/events","assignees_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/assignees{/user}","branches_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/branches{/branch}","tags_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/tags","blobs_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/git/refs{/sha}","trees_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/statuses/{sha}","languages_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/languages","stargazers_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/stargazers","contributors_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/contributors","subscribers_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/subscribers","subscription_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/subscription","commits_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/commits{/sha}","git_commits_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/git/commits{/sha}","comments_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/comments{/number}","issue_comment_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/issues/comments{/number}","contents_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/contents/{+path}","compare_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/merges","archive_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/downloads","issues_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/issues{/number}","pulls_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls{/number}","milestones_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/milestones{/number}","notifications_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/labels{/name}","releases_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/releases{/id}","deployments_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/deployments","created_at":"2017-05-16T17:28:34Z","updated_at":"2018-11-29T13:39:27Z","pushed_at":"2018-11-29T02:31:45Z","git_url":"git://github.com/aws/aws-toolkit-jetbrains.git","ssh_url":"git@github.com:aws/aws-toolkit-jetbrains.git","clone_url":"https://github.com/aws/aws-toolkit-jetbrains.git","svn_url":"https://github.com/aws/aws-toolkit-jetbrains","homepage":"","size":1553,"stargazers_count":88,"watchers_count":88,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":73,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":13,"open_issues":73,"watchers":88,"default_branch":"master"}},"base":{"label":"aws:master","ref":"master","sha":"47177cebb32dcb2940d9bd09dd40cbe224a9225d","user":{"login":"aws","id":2232217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzIyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"repo":{"id":91485909,"node_id":"MDEwOlJlcG9zaXRvcnk5MTQ4NTkwOQ==","name":"aws-toolkit-jetbrains","full_name":"aws/aws-toolkit-jetbrains","private":false,"owner":{"login":"aws","id":2232217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzIyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/aws/aws-toolkit-jetbrains","description":"AWS Toolkit for JetBrains - a plugin for interacting with AWS from JetBrains IDEs","fork":false,"url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains","forks_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/forks","keys_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/teams","hooks_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/hooks","issue_events_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/issues/events{/number}","events_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/events","assignees_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/assignees{/user}","branches_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/branches{/branch}","tags_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/tags","blobs_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/git/refs{/sha}","trees_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/statuses/{sha}","languages_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/languages","stargazers_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/stargazers","contributors_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/contributors","subscribers_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/subscribers","subscription_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/subscription","commits_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/commits{/sha}","git_commits_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/git/commits{/sha}","comments_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/comments{/number}","issue_comment_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/issues/comments{/number}","contents_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/contents/{+path}","compare_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/merges","archive_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/downloads","issues_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/issues{/number}","pulls_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls{/number}","milestones_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/milestones{/number}","notifications_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/labels{/name}","releases_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/releases{/id}","deployments_url":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/deployments","created_at":"2017-05-16T17:28:34Z","updated_at":"2018-11-29T13:39:27Z","pushed_at":"2018-11-29T02:31:45Z","git_url":"git://github.com/aws/aws-toolkit-jetbrains.git","ssh_url":"git@github.com:aws/aws-toolkit-jetbrains.git","clone_url":"https://github.com/aws/aws-toolkit-jetbrains.git","svn_url":"https://github.com/aws/aws-toolkit-jetbrains","homepage":"","size":1553,"stargazers_count":88,"watchers_count":88,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":73,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":13,"open_issues":73,"watchers":88,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/639"},"html":{"href":"https://github.com/aws/aws-toolkit-jetbrains/pull/639"},"issue":{"href":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/issues/639"},"comments":{"href":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/issues/639/comments"},"review_comments":{"href":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/639/comments"},"review_comment":{"href":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/pulls/639/commits"},"statuses":{"href":"https://api.github.com/repos/aws/aws-toolkit-jetbrains/statuses/231a6a2471ea78a87b5c3f39dee8366c0bfd5a3e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"awschristou"}}