{"action":"created","comment":{"url":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/comments/87063193","pull_request_review_id":7690329,"id":87063193,"diff_hunk":"@@ -0,0 +1,83 @@\n+import Ember from \"ember\";\n+import { v1, v4 } from \"ember-uuid\";\n+/**\n+ * Converts a STIX object into a bundle\n+ * \n+ * @module\n+ * @extends ember/Mixin\n+ */\n+var saveData = (function () {\n+    var a = document.createElement(\"a\");\n+    document.body.appendChild(a);\n+    a.style = \"display: none\";\n+    return function (data, fileName) {\n+        var json = JSON.stringify(data),\n+            blob = new Blob([json], {type: \"octet/stream\"}),\n+            url = window.URL.createObjectURL(blob);\n+        a.href = url;\n+        a.download = fileName;\n+        a.click();\n+        window.URL.revokeObjectURL(url);\n+    };\n+}());\n+\n+export default Ember.Mixin.create({\n+    /** @type {Object} */\n+    actions: {\n+        /**\n+         * Generate and return a bundle object\n+         * \n+         * @function actions:createBundle\n+         * @param {Object} STIX object(s) to be bundled\n+         * @returns {Object}\n+         */\n+        downloadBundle(items) {\n+            const typePathMapping = {","path":"cti-stix-ui/app/mixins/create-bundle.js","position":35,"original_position":35,"commit_id":"080f292700b0f6d4f6e0893530674271b0f535ce","original_commit_id":"080f292700b0f6d4f6e0893530674271b0f535ce","user":{"login":"exceptionfactory","id":20425862,"avatar_url":"https://avatars.githubusercontent.com/u/20425862?v=3","gravatar_id":"","url":"https://api.github.com/users/exceptionfactory","html_url":"https://github.com/exceptionfactory","followers_url":"https://api.github.com/users/exceptionfactory/followers","following_url":"https://api.github.com/users/exceptionfactory/following{/other_user}","gists_url":"https://api.github.com/users/exceptionfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/exceptionfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exceptionfactory/subscriptions","organizations_url":"https://api.github.com/users/exceptionfactory/orgs","repos_url":"https://api.github.com/users/exceptionfactory/repos","events_url":"https://api.github.com/users/exceptionfactory/events{/privacy}","received_events_url":"https://api.github.com/users/exceptionfactory/received_events","type":"User","site_admin":false},"body":"The typePathMapping can be moved up to be a member of the Mixin at the same level as actions, avoiding redefining the variable for every invocation of downloadBundle()","created_at":"2016-11-08T19:20:39Z","updated_at":"2016-11-08T19:32:01Z","html_url":"https://github.com/iadgov/cti-stix-services/pull/48#discussion_r87063193","pull_request_url":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/comments/87063193"},"html":{"href":"https://github.com/iadgov/cti-stix-services/pull/48#discussion_r87063193"},"pull_request":{"href":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/48","id":92840195,"html_url":"https://github.com/iadgov/cti-stix-services/pull/48","diff_url":"https://github.com/iadgov/cti-stix-services/pull/48.diff","patch_url":"https://github.com/iadgov/cti-stix-services/pull/48.patch","issue_url":"https://api.github.com/repos/iadgov/cti-stix-services/issues/48","number":48,"state":"open","locked":false,"title":"Fixed the Download Button","user":{"login":"infosec-alchemist","id":19472140,"avatar_url":"https://avatars.githubusercontent.com/u/19472140?v=3","gravatar_id":"","url":"https://api.github.com/users/infosec-alchemist","html_url":"https://github.com/infosec-alchemist","followers_url":"https://api.github.com/users/infosec-alchemist/followers","following_url":"https://api.github.com/users/infosec-alchemist/following{/other_user}","gists_url":"https://api.github.com/users/infosec-alchemist/gists{/gist_id}","starred_url":"https://api.github.com/users/infosec-alchemist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infosec-alchemist/subscriptions","organizations_url":"https://api.github.com/users/infosec-alchemist/orgs","repos_url":"https://api.github.com/users/infosec-alchemist/repos","events_url":"https://api.github.com/users/infosec-alchemist/events{/privacy}","received_events_url":"https://api.github.com/users/infosec-alchemist/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-08T19:11:41Z","updated_at":"2016-11-08T19:32:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a313a5cade4023da5e9c77d6fc5c95ea20a43c2","assignee":{"login":"exceptionfactory","id":20425862,"avatar_url":"https://avatars.githubusercontent.com/u/20425862?v=3","gravatar_id":"","url":"https://api.github.com/users/exceptionfactory","html_url":"https://github.com/exceptionfactory","followers_url":"https://api.github.com/users/exceptionfactory/followers","following_url":"https://api.github.com/users/exceptionfactory/following{/other_user}","gists_url":"https://api.github.com/users/exceptionfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/exceptionfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exceptionfactory/subscriptions","organizations_url":"https://api.github.com/users/exceptionfactory/orgs","repos_url":"https://api.github.com/users/exceptionfactory/repos","events_url":"https://api.github.com/users/exceptionfactory/events{/privacy}","received_events_url":"https://api.github.com/users/exceptionfactory/received_events","type":"User","site_admin":false},"assignees":[{"login":"exceptionfactory","id":20425862,"avatar_url":"https://avatars.githubusercontent.com/u/20425862?v=3","gravatar_id":"","url":"https://api.github.com/users/exceptionfactory","html_url":"https://github.com/exceptionfactory","followers_url":"https://api.github.com/users/exceptionfactory/followers","following_url":"https://api.github.com/users/exceptionfactory/following{/other_user}","gists_url":"https://api.github.com/users/exceptionfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/exceptionfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exceptionfactory/subscriptions","organizations_url":"https://api.github.com/users/exceptionfactory/orgs","repos_url":"https://api.github.com/users/exceptionfactory/repos","events_url":"https://api.github.com/users/exceptionfactory/events{/privacy}","received_events_url":"https://api.github.com/users/exceptionfactory/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/48/commits","review_comments_url":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/48/comments","review_comment_url":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iadgov/cti-stix-services/issues/48/comments","statuses_url":"https://api.github.com/repos/iadgov/cti-stix-services/statuses/080f292700b0f6d4f6e0893530674271b0f535ce","head":{"label":"iadgov:issue-18","ref":"issue-18","sha":"080f292700b0f6d4f6e0893530674271b0f535ce","user":{"login":"iadgov","id":6088344,"avatar_url":"https://avatars.githubusercontent.com/u/6088344?v=3","gravatar_id":"","url":"https://api.github.com/users/iadgov","html_url":"https://github.com/iadgov","followers_url":"https://api.github.com/users/iadgov/followers","following_url":"https://api.github.com/users/iadgov/following{/other_user}","gists_url":"https://api.github.com/users/iadgov/gists{/gist_id}","starred_url":"https://api.github.com/users/iadgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iadgov/subscriptions","organizations_url":"https://api.github.com/users/iadgov/orgs","repos_url":"https://api.github.com/users/iadgov/repos","events_url":"https://api.github.com/users/iadgov/events{/privacy}","received_events_url":"https://api.github.com/users/iadgov/received_events","type":"Organization","site_admin":false},"repo":{"id":69881841,"name":"cti-stix-services","full_name":"iadgov/cti-stix-services","owner":{"login":"iadgov","id":6088344,"avatar_url":"https://avatars.githubusercontent.com/u/6088344?v=3","gravatar_id":"","url":"https://api.github.com/users/iadgov","html_url":"https://github.com/iadgov","followers_url":"https://api.github.com/users/iadgov/followers","following_url":"https://api.github.com/users/iadgov/following{/other_user}","gists_url":"https://api.github.com/users/iadgov/gists{/gist_id}","starred_url":"https://api.github.com/users/iadgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iadgov/subscriptions","organizations_url":"https://api.github.com/users/iadgov/orgs","repos_url":"https://api.github.com/users/iadgov/repos","events_url":"https://api.github.com/users/iadgov/events{/privacy}","received_events_url":"https://api.github.com/users/iadgov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iadgov/cti-stix-services","description":"Docker containers for Unfetter backend services. iadgov","fork":false,"url":"https://api.github.com/repos/iadgov/cti-stix-services","forks_url":"https://api.github.com/repos/iadgov/cti-stix-services/forks","keys_url":"https://api.github.com/repos/iadgov/cti-stix-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iadgov/cti-stix-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iadgov/cti-stix-services/teams","hooks_url":"https://api.github.com/repos/iadgov/cti-stix-services/hooks","issue_events_url":"https://api.github.com/repos/iadgov/cti-stix-services/issues/events{/number}","events_url":"https://api.github.com/repos/iadgov/cti-stix-services/events","assignees_url":"https://api.github.com/repos/iadgov/cti-stix-services/assignees{/user}","branches_url":"https://api.github.com/repos/iadgov/cti-stix-services/branches{/branch}","tags_url":"https://api.github.com/repos/iadgov/cti-stix-services/tags","blobs_url":"https://api.github.com/repos/iadgov/cti-stix-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iadgov/cti-stix-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iadgov/cti-stix-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/iadgov/cti-stix-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iadgov/cti-stix-services/statuses/{sha}","languages_url":"https://api.github.com/repos/iadgov/cti-stix-services/languages","stargazers_url":"https://api.github.com/repos/iadgov/cti-stix-services/stargazers","contributors_url":"https://api.github.com/repos/iadgov/cti-stix-services/contributors","subscribers_url":"https://api.github.com/repos/iadgov/cti-stix-services/subscribers","subscription_url":"https://api.github.com/repos/iadgov/cti-stix-services/subscription","commits_url":"https://api.github.com/repos/iadgov/cti-stix-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/iadgov/cti-stix-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/iadgov/cti-stix-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/iadgov/cti-stix-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/iadgov/cti-stix-services/contents/{+path}","compare_url":"https://api.github.com/repos/iadgov/cti-stix-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iadgov/cti-stix-services/merges","archive_url":"https://api.github.com/repos/iadgov/cti-stix-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iadgov/cti-stix-services/downloads","issues_url":"https://api.github.com/repos/iadgov/cti-stix-services/issues{/number}","pulls_url":"https://api.github.com/repos/iadgov/cti-stix-services/pulls{/number}","milestones_url":"https://api.github.com/repos/iadgov/cti-stix-services/milestones{/number}","notifications_url":"https://api.github.com/repos/iadgov/cti-stix-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iadgov/cti-stix-services/labels{/name}","releases_url":"https://api.github.com/repos/iadgov/cti-stix-services/releases{/id}","deployments_url":"https://api.github.com/repos/iadgov/cti-stix-services/deployments","created_at":"2016-10-03T15:02:37Z","updated_at":"2016-11-04T14:36:15Z","pushed_at":"2016-11-08T19:11:41Z","git_url":"git://github.com/iadgov/cti-stix-services.git","ssh_url":"git@github.com:iadgov/cti-stix-services.git","clone_url":"https://github.com/iadgov/cti-stix-services.git","svn_url":"https://github.com/iadgov/cti-stix-services","homepage":"http://unfetter.io","size":303,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":10,"forks":1,"open_issues":10,"watchers":1,"default_branch":"master"}},"base":{"label":"iadgov:master","ref":"master","sha":"0190c31c1f1cbd6dc55cb965cb3852c3188a6324","user":{"login":"iadgov","id":6088344,"avatar_url":"https://avatars.githubusercontent.com/u/6088344?v=3","gravatar_id":"","url":"https://api.github.com/users/iadgov","html_url":"https://github.com/iadgov","followers_url":"https://api.github.com/users/iadgov/followers","following_url":"https://api.github.com/users/iadgov/following{/other_user}","gists_url":"https://api.github.com/users/iadgov/gists{/gist_id}","starred_url":"https://api.github.com/users/iadgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iadgov/subscriptions","organizations_url":"https://api.github.com/users/iadgov/orgs","repos_url":"https://api.github.com/users/iadgov/repos","events_url":"https://api.github.com/users/iadgov/events{/privacy}","received_events_url":"https://api.github.com/users/iadgov/received_events","type":"Organization","site_admin":false},"repo":{"id":69881841,"name":"cti-stix-services","full_name":"iadgov/cti-stix-services","owner":{"login":"iadgov","id":6088344,"avatar_url":"https://avatars.githubusercontent.com/u/6088344?v=3","gravatar_id":"","url":"https://api.github.com/users/iadgov","html_url":"https://github.com/iadgov","followers_url":"https://api.github.com/users/iadgov/followers","following_url":"https://api.github.com/users/iadgov/following{/other_user}","gists_url":"https://api.github.com/users/iadgov/gists{/gist_id}","starred_url":"https://api.github.com/users/iadgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iadgov/subscriptions","organizations_url":"https://api.github.com/users/iadgov/orgs","repos_url":"https://api.github.com/users/iadgov/repos","events_url":"https://api.github.com/users/iadgov/events{/privacy}","received_events_url":"https://api.github.com/users/iadgov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iadgov/cti-stix-services","description":"Docker containers for Unfetter backend services. iadgov","fork":false,"url":"https://api.github.com/repos/iadgov/cti-stix-services","forks_url":"https://api.github.com/repos/iadgov/cti-stix-services/forks","keys_url":"https://api.github.com/repos/iadgov/cti-stix-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iadgov/cti-stix-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iadgov/cti-stix-services/teams","hooks_url":"https://api.github.com/repos/iadgov/cti-stix-services/hooks","issue_events_url":"https://api.github.com/repos/iadgov/cti-stix-services/issues/events{/number}","events_url":"https://api.github.com/repos/iadgov/cti-stix-services/events","assignees_url":"https://api.github.com/repos/iadgov/cti-stix-services/assignees{/user}","branches_url":"https://api.github.com/repos/iadgov/cti-stix-services/branches{/branch}","tags_url":"https://api.github.com/repos/iadgov/cti-stix-services/tags","blobs_url":"https://api.github.com/repos/iadgov/cti-stix-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iadgov/cti-stix-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iadgov/cti-stix-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/iadgov/cti-stix-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iadgov/cti-stix-services/statuses/{sha}","languages_url":"https://api.github.com/repos/iadgov/cti-stix-services/languages","stargazers_url":"https://api.github.com/repos/iadgov/cti-stix-services/stargazers","contributors_url":"https://api.github.com/repos/iadgov/cti-stix-services/contributors","subscribers_url":"https://api.github.com/repos/iadgov/cti-stix-services/subscribers","subscription_url":"https://api.github.com/repos/iadgov/cti-stix-services/subscription","commits_url":"https://api.github.com/repos/iadgov/cti-stix-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/iadgov/cti-stix-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/iadgov/cti-stix-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/iadgov/cti-stix-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/iadgov/cti-stix-services/contents/{+path}","compare_url":"https://api.github.com/repos/iadgov/cti-stix-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iadgov/cti-stix-services/merges","archive_url":"https://api.github.com/repos/iadgov/cti-stix-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iadgov/cti-stix-services/downloads","issues_url":"https://api.github.com/repos/iadgov/cti-stix-services/issues{/number}","pulls_url":"https://api.github.com/repos/iadgov/cti-stix-services/pulls{/number}","milestones_url":"https://api.github.com/repos/iadgov/cti-stix-services/milestones{/number}","notifications_url":"https://api.github.com/repos/iadgov/cti-stix-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iadgov/cti-stix-services/labels{/name}","releases_url":"https://api.github.com/repos/iadgov/cti-stix-services/releases{/id}","deployments_url":"https://api.github.com/repos/iadgov/cti-stix-services/deployments","created_at":"2016-10-03T15:02:37Z","updated_at":"2016-11-04T14:36:15Z","pushed_at":"2016-11-08T19:11:41Z","git_url":"git://github.com/iadgov/cti-stix-services.git","ssh_url":"git@github.com:iadgov/cti-stix-services.git","clone_url":"https://github.com/iadgov/cti-stix-services.git","svn_url":"https://github.com/iadgov/cti-stix-services","homepage":"http://unfetter.io","size":303,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":10,"forks":1,"open_issues":10,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/48"},"html":{"href":"https://github.com/iadgov/cti-stix-services/pull/48"},"issue":{"href":"https://api.github.com/repos/iadgov/cti-stix-services/issues/48"},"comments":{"href":"https://api.github.com/repos/iadgov/cti-stix-services/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iadgov/cti-stix-services/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/iadgov/cti-stix-services/statuses/080f292700b0f6d4f6e0893530674271b0f535ce"}}}}
{"actor":{"display_login":"exceptionfactory"}}