{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/comments/149224843","pull_request_review_id":74586757,"id":149224843,"diff_hunk":"@@ -0,0 +1,47 @@\n+// Copyright (c) Microsoft Corporation. All rights reserved.\n+// Licensed under the MIT License.\n+\n+'use strict';\n+\n+import * as child_process from 'child_process';\n+import * as os from 'os';\n+import { window } from 'vscode';\n+import { IPersistentStateFactor, PersistentState } from './common/persistentState';\n+\n+const BANNER_URL = 'https://aka.ms/egv4z1';\n+\n+export class BannerService {\n+    private shouldShowBanner: PersistentState<boolean>;\n+    constructor(persistentStateFactory: IPersistentStateFactor) {\n+        this.shouldShowBanner = persistentStateFactory.createGlobalPersistentState('SHOW_NEW_EXT_BANNER', true);\n+        this.showBanner();\n+    }\n+    private showBanner() {\n+        if (!this.shouldShowBanner.value) {\n+            return;\n+        }\n+        this.shouldShowBanner.value = false;\n+\n+        const message = 'Would you like to know what is new?';\n+        const yesButton = 'Yes';\n+        window.showInformationMessage(message, yesButton).then((value) => {\n+            if (value === yesButton) {\n+                this.displayBanner();\n+            }\n+        });\n+    }\n+    private displayBanner() {\n+        let openCommand: string | undefined;\n+        if (os.platform() === 'win32') {\n+            openCommand = 'explorer';\n+        } else if (os.platform() === 'darwin') {\n+            openCommand = '/usr/bin/open';\n+        } else {\n+            openCommand = '/usr/bin/xdg-open';\n+        }\n+        if (!openCommand) {\n+            console.error(`Unable to determine platform to capture user feedback in Python extension ${os.platform()}`);","path":"src/client/banner.ts","position":43,"original_position":43,"commit_id":"d1ac3a685ca3a7615a57dda85c432389acc03132","original_commit_id":"d1ac3a685ca3a7615a57dda85c432389acc03132","user":{"login":"DonJayamanne","id":1948812,"avatar_url":"https://avatars2.githubusercontent.com/u/1948812?v=4","gravatar_id":"","url":"https://api.github.com/users/DonJayamanne","html_url":"https://github.com/DonJayamanne","followers_url":"https://api.github.com/users/DonJayamanne/followers","following_url":"https://api.github.com/users/DonJayamanne/following{/other_user}","gists_url":"https://api.github.com/users/DonJayamanne/gists{/gist_id}","starred_url":"https://api.github.com/users/DonJayamanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonJayamanne/subscriptions","organizations_url":"https://api.github.com/users/DonJayamanne/orgs","repos_url":"https://api.github.com/users/DonJayamanne/repos","events_url":"https://api.github.com/users/DonJayamanne/events{/privacy}","received_events_url":"https://api.github.com/users/DonJayamanne/received_events","type":"User","site_admin":false},"body":"This is the generic banner.\r\nAgreed, will include URL","created_at":"2017-11-06T22:36:47Z","updated_at":"2017-11-06T22:36:47Z","html_url":"https://github.com/Microsoft/vscode-python/pull/7#discussion_r149224843","pull_request_url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/7","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/comments/149224843"},"html":{"href":"https://github.com/Microsoft/vscode-python/pull/7#discussion_r149224843"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/7"}},"in_reply_to_id":149216576},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/7","id":150948480,"html_url":"https://github.com/Microsoft/vscode-python/pull/7","diff_url":"https://github.com/Microsoft/vscode-python/pull/7.diff","patch_url":"https://github.com/Microsoft/vscode-python/pull/7.patch","issue_url":"https://api.github.com/repos/Microsoft/vscode-python/issues/7","number":7,"state":"open","locked":false,"title":"Add survey and banner","user":{"login":"DonJayamanne","id":1948812,"avatar_url":"https://avatars2.githubusercontent.com/u/1948812?v=4","gravatar_id":"","url":"https://api.github.com/users/DonJayamanne","html_url":"https://github.com/DonJayamanne","followers_url":"https://api.github.com/users/DonJayamanne/followers","following_url":"https://api.github.com/users/DonJayamanne/following{/other_user}","gists_url":"https://api.github.com/users/DonJayamanne/gists{/gist_id}","starred_url":"https://api.github.com/users/DonJayamanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonJayamanne/subscriptions","organizations_url":"https://api.github.com/users/DonJayamanne/orgs","repos_url":"https://api.github.com/users/DonJayamanne/repos","events_url":"https://api.github.com/users/DonJayamanne/events{/privacy}","received_events_url":"https://api.github.com/users/DonJayamanne/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-06T20:15:30Z","updated_at":"2017-11-06T22:36:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ac70bcce17890b8fdfff162d6d559a7e2460162","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/7/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/7/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vscode-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vscode-python/issues/7/comments","statuses_url":"https://api.github.com/repos/Microsoft/vscode-python/statuses/d1ac3a685ca3a7615a57dda85c432389acc03132","head":{"label":"Microsoft:SurveyAndBanner","ref":"SurveyAndBanner","sha":"d1ac3a685ca3a7615a57dda85c432389acc03132","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":106462765,"name":"vscode-python","full_name":"Microsoft/vscode-python","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vscode-python","description":"Cross platform editing, debugging, linting, testing (and more) Python (2.7 to 3.6) code (including Jupyter support) using Visual Studio Code","fork":true,"url":"https://api.github.com/repos/Microsoft/vscode-python","forks_url":"https://api.github.com/repos/Microsoft/vscode-python/forks","keys_url":"https://api.github.com/repos/Microsoft/vscode-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vscode-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vscode-python/teams","hooks_url":"https://api.github.com/repos/Microsoft/vscode-python/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vscode-python/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vscode-python/events","assignees_url":"https://api.github.com/repos/Microsoft/vscode-python/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vscode-python/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vscode-python/tags","blobs_url":"https://api.github.com/repos/Microsoft/vscode-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vscode-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vscode-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vscode-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vscode-python/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vscode-python/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vscode-python/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vscode-python/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vscode-python/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vscode-python/subscription","commits_url":"https://api.github.com/repos/Microsoft/vscode-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vscode-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vscode-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vscode-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vscode-python/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vscode-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vscode-python/merges","archive_url":"https://api.github.com/repos/Microsoft/vscode-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vscode-python/downloads","issues_url":"https://api.github.com/repos/Microsoft/vscode-python/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vscode-python/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vscode-python/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vscode-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vscode-python/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vscode-python/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vscode-python/deployments","created_at":"2017-10-10T19:37:29Z","updated_at":"2017-11-06T19:00:20Z","pushed_at":"2017-11-06T21:51:25Z","git_url":"git://github.com/Microsoft/vscode-python.git","ssh_url":"git@github.com:Microsoft/vscode-python.git","clone_url":"https://github.com/Microsoft/vscode-python.git","svn_url":"https://github.com/Microsoft/vscode-python","homepage":"http://donjayamanne.github.io/pythonVSCode","size":35740,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"45530ab91f42840f077bca0f0cdbe08d96807e94","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":106462765,"name":"vscode-python","full_name":"Microsoft/vscode-python","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vscode-python","description":"Cross platform editing, debugging, linting, testing (and more) Python (2.7 to 3.6) code (including Jupyter support) using Visual Studio Code","fork":true,"url":"https://api.github.com/repos/Microsoft/vscode-python","forks_url":"https://api.github.com/repos/Microsoft/vscode-python/forks","keys_url":"https://api.github.com/repos/Microsoft/vscode-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vscode-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vscode-python/teams","hooks_url":"https://api.github.com/repos/Microsoft/vscode-python/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vscode-python/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vscode-python/events","assignees_url":"https://api.github.com/repos/Microsoft/vscode-python/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vscode-python/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vscode-python/tags","blobs_url":"https://api.github.com/repos/Microsoft/vscode-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vscode-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vscode-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vscode-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vscode-python/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vscode-python/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vscode-python/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vscode-python/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vscode-python/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vscode-python/subscription","commits_url":"https://api.github.com/repos/Microsoft/vscode-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vscode-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vscode-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vscode-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vscode-python/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vscode-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vscode-python/merges","archive_url":"https://api.github.com/repos/Microsoft/vscode-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vscode-python/downloads","issues_url":"https://api.github.com/repos/Microsoft/vscode-python/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vscode-python/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vscode-python/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vscode-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vscode-python/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vscode-python/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vscode-python/deployments","created_at":"2017-10-10T19:37:29Z","updated_at":"2017-11-06T19:00:20Z","pushed_at":"2017-11-06T21:51:25Z","git_url":"git://github.com/Microsoft/vscode-python.git","ssh_url":"git@github.com:Microsoft/vscode-python.git","clone_url":"https://github.com/Microsoft/vscode-python.git","svn_url":"https://github.com/Microsoft/vscode-python","homepage":"http://donjayamanne.github.io/pythonVSCode","size":35740,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/7"},"html":{"href":"https://github.com/Microsoft/vscode-python/pull/7"},"issue":{"href":"https://api.github.com/repos/Microsoft/vscode-python/issues/7"},"comments":{"href":"https://api.github.com/repos/Microsoft/vscode-python/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vscode-python/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vscode-python/statuses/d1ac3a685ca3a7615a57dda85c432389acc03132"}},"author_association":"NONE"}}
{"actor":{"display_login":"DonJayamanne"}}