{"action":"created","comment":{"url":"https://api.github.com/repos/github/VisualStudio/pulls/comments/43195977","id":43195977,"diff_hunk":"@@ -0,0 +1,73 @@\n+﻿using System;\n+using System.Reactive.Linq;\n+using GitHub.Api;\n+using GitHub.Extensions;\n+using GitHub.Models;\n+using GitHub.Services;\n+using GitHub.UI;\n+using GitHub.VisualStudio.Base;\n+using Microsoft.TeamFoundation.MVVM;\n+using System.Globalization;\n+using GitHub.Primitives;\n+using System.Threading.Tasks;\n+\n+namespace GitHub.VisualStudio.TeamExplorer.Sync\n+{\n+    public class EnsureLoggedInSection : TeamExplorerSectionBase\n+    {\n+        readonly IRepositoryHosts hosts;\n+        readonly IVSServices vsServices;\n+\n+        public EnsureLoggedInSection(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,\n+            IConnectionManager cm, IRepositoryHosts hosts, IVSServices vsServices)\n+            : base(apiFactory, holder, cm)\n+        {\n+            IsVisible = false;\n+            this.hosts = hosts;\n+            this.vsServices = vsServices;\n+        }\n+\n+        public override void Initialize(IServiceProvider serviceProvider)\n+        {\n+            base.Initialize(serviceProvider);\n+            CheckLogin().Forget();\n+        }\n+\n+        protected override void RepoChanged()\n+        {\n+            base.RepoChanged();\n+            CheckLogin().Forget();","path":"src/GitHub.VisualStudio/Base/EnsureLoggedInSection.cs","position":39,"original_position":39,"commit_id":"131e229f69a5fcc9b98caca0dc8cc2d4e0148fe3","original_commit_id":"131e229f69a5fcc9b98caca0dc8cc2d4e0148fe3","user":{"login":"Haacked","id":19977,"avatar_url":"https://avatars.githubusercontent.com/u/19977?v=3","gravatar_id":"","url":"https://api.github.com/users/Haacked","html_url":"https://github.com/Haacked","followers_url":"https://api.github.com/users/Haacked/followers","following_url":"https://api.github.com/users/Haacked/following{/other_user}","gists_url":"https://api.github.com/users/Haacked/gists{/gist_id}","starred_url":"https://api.github.com/users/Haacked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haacked/subscriptions","organizations_url":"https://api.github.com/users/Haacked/orgs","repos_url":"https://api.github.com/users/Haacked/repos","events_url":"https://api.github.com/users/Haacked/events{/privacy}","received_events_url":"https://api.github.com/users/Haacked/received_events","type":"User","site_admin":true},"body":"Shouldn't this be `.Wait()`?","created_at":"2015-10-27T22:18:46Z","updated_at":"2015-10-27T22:18:46Z","html_url":"https://github.com/github/VisualStudio/pull/135#discussion_r43195977","pull_request_url":"https://api.github.com/repos/github/VisualStudio/pulls/135","_links":{"self":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/comments/43195977"},"html":{"href":"https://github.com/github/VisualStudio/pull/135#discussion_r43195977"},"pull_request":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/135"}}},"pull_request":{"url":"https://api.github.com/repos/github/VisualStudio/pulls/135","id":48748633,"html_url":"https://github.com/github/VisualStudio/pull/135","diff_url":"https://github.com/github/VisualStudio/pull/135.diff","patch_url":"https://github.com/github/VisualStudio/pull/135.patch","issue_url":"https://api.github.com/repos/github/VisualStudio/issues/135","number":135,"state":"open","locked":false,"title":"Login in the sync page","user":{"login":"shana","id":310137,"avatar_url":"https://avatars.githubusercontent.com/u/310137?v=3","gravatar_id":"","url":"https://api.github.com/users/shana","html_url":"https://github.com/shana","followers_url":"https://api.github.com/users/shana/followers","following_url":"https://api.github.com/users/shana/following{/other_user}","gists_url":"https://api.github.com/users/shana/gists{/gist_id}","starred_url":"https://api.github.com/users/shana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shana/subscriptions","organizations_url":"https://api.github.com/users/shana/orgs","repos_url":"https://api.github.com/users/shana/repos","events_url":"https://api.github.com/users/shana/events{/privacy}","received_events_url":"https://api.github.com/users/shana/received_events","type":"User","site_admin":true},"body":"Fixes #57\r\n\r\nIf the current repository is a github/github enterprise repo but the user isn't logged in to its instance, then network git operations might fail. Show a warning on the Sync page if this is the case, and allow the\r\nuser to login from there.","created_at":"2015-10-26T14:49:13Z","updated_at":"2015-10-27T22:18:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2b2cc2cb908e0f4bc5b6b379f0ab77445a6b715","assignee":{"login":"Haacked","id":19977,"avatar_url":"https://avatars.githubusercontent.com/u/19977?v=3","gravatar_id":"","url":"https://api.github.com/users/Haacked","html_url":"https://github.com/Haacked","followers_url":"https://api.github.com/users/Haacked/followers","following_url":"https://api.github.com/users/Haacked/following{/other_user}","gists_url":"https://api.github.com/users/Haacked/gists{/gist_id}","starred_url":"https://api.github.com/users/Haacked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haacked/subscriptions","organizations_url":"https://api.github.com/users/Haacked/orgs","repos_url":"https://api.github.com/users/Haacked/repos","events_url":"https://api.github.com/users/Haacked/events{/privacy}","received_events_url":"https://api.github.com/users/Haacked/received_events","type":"User","site_admin":true},"milestone":null,"commits_url":"https://api.github.com/repos/github/VisualStudio/pulls/135/commits","review_comments_url":"https://api.github.com/repos/github/VisualStudio/pulls/135/comments","review_comment_url":"https://api.github.com/repos/github/VisualStudio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/github/VisualStudio/issues/135/comments","statuses_url":"https://api.github.com/repos/github/VisualStudio/statuses/131e229f69a5fcc9b98caca0dc8cc2d4e0148fe3","head":{"label":"github:feature/login-on-sync-page","ref":"feature/login-on-sync-page","sha":"131e229f69a5fcc9b98caca0dc8cc2d4e0148fe3","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":38325182,"name":"VisualStudio","full_name":"github/VisualStudio","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/VisualStudio","description":"GitHub Extension for Visual Studio","fork":false,"url":"https://api.github.com/repos/github/VisualStudio","forks_url":"https://api.github.com/repos/github/VisualStudio/forks","keys_url":"https://api.github.com/repos/github/VisualStudio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/VisualStudio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/VisualStudio/teams","hooks_url":"https://api.github.com/repos/github/VisualStudio/hooks","issue_events_url":"https://api.github.com/repos/github/VisualStudio/issues/events{/number}","events_url":"https://api.github.com/repos/github/VisualStudio/events","assignees_url":"https://api.github.com/repos/github/VisualStudio/assignees{/user}","branches_url":"https://api.github.com/repos/github/VisualStudio/branches{/branch}","tags_url":"https://api.github.com/repos/github/VisualStudio/tags","blobs_url":"https://api.github.com/repos/github/VisualStudio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/VisualStudio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/VisualStudio/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/VisualStudio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/VisualStudio/statuses/{sha}","languages_url":"https://api.github.com/repos/github/VisualStudio/languages","stargazers_url":"https://api.github.com/repos/github/VisualStudio/stargazers","contributors_url":"https://api.github.com/repos/github/VisualStudio/contributors","subscribers_url":"https://api.github.com/repos/github/VisualStudio/subscribers","subscription_url":"https://api.github.com/repos/github/VisualStudio/subscription","commits_url":"https://api.github.com/repos/github/VisualStudio/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/VisualStudio/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/VisualStudio/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/VisualStudio/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/VisualStudio/contents/{+path}","compare_url":"https://api.github.com/repos/github/VisualStudio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/VisualStudio/merges","archive_url":"https://api.github.com/repos/github/VisualStudio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/VisualStudio/downloads","issues_url":"https://api.github.com/repos/github/VisualStudio/issues{/number}","pulls_url":"https://api.github.com/repos/github/VisualStudio/pulls{/number}","milestones_url":"https://api.github.com/repos/github/VisualStudio/milestones{/number}","notifications_url":"https://api.github.com/repos/github/VisualStudio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/VisualStudio/labels{/name}","releases_url":"https://api.github.com/repos/github/VisualStudio/releases{/id}","created_at":"2015-06-30T18:11:40Z","updated_at":"2015-10-25T23:30:13Z","pushed_at":"2015-10-27T21:57:53Z","git_url":"git://github.com/github/VisualStudio.git","ssh_url":"git@github.com:github/VisualStudio.git","clone_url":"https://github.com/github/VisualStudio.git","svn_url":"https://github.com/github/VisualStudio","homepage":"https://visualstudio.github.com","size":22806,"stargazers_count":304,"watchers_count":304,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"open_issues_count":33,"forks":77,"open_issues":33,"watchers":304,"default_branch":"master"}},"base":{"label":"github:master","ref":"master","sha":"4c5fee09db9be2fcb0894918453f832e1765fe6b","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":38325182,"name":"VisualStudio","full_name":"github/VisualStudio","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/VisualStudio","description":"GitHub Extension for Visual Studio","fork":false,"url":"https://api.github.com/repos/github/VisualStudio","forks_url":"https://api.github.com/repos/github/VisualStudio/forks","keys_url":"https://api.github.com/repos/github/VisualStudio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/VisualStudio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/VisualStudio/teams","hooks_url":"https://api.github.com/repos/github/VisualStudio/hooks","issue_events_url":"https://api.github.com/repos/github/VisualStudio/issues/events{/number}","events_url":"https://api.github.com/repos/github/VisualStudio/events","assignees_url":"https://api.github.com/repos/github/VisualStudio/assignees{/user}","branches_url":"https://api.github.com/repos/github/VisualStudio/branches{/branch}","tags_url":"https://api.github.com/repos/github/VisualStudio/tags","blobs_url":"https://api.github.com/repos/github/VisualStudio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/VisualStudio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/VisualStudio/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/VisualStudio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/VisualStudio/statuses/{sha}","languages_url":"https://api.github.com/repos/github/VisualStudio/languages","stargazers_url":"https://api.github.com/repos/github/VisualStudio/stargazers","contributors_url":"https://api.github.com/repos/github/VisualStudio/contributors","subscribers_url":"https://api.github.com/repos/github/VisualStudio/subscribers","subscription_url":"https://api.github.com/repos/github/VisualStudio/subscription","commits_url":"https://api.github.com/repos/github/VisualStudio/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/VisualStudio/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/VisualStudio/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/VisualStudio/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/VisualStudio/contents/{+path}","compare_url":"https://api.github.com/repos/github/VisualStudio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/VisualStudio/merges","archive_url":"https://api.github.com/repos/github/VisualStudio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/VisualStudio/downloads","issues_url":"https://api.github.com/repos/github/VisualStudio/issues{/number}","pulls_url":"https://api.github.com/repos/github/VisualStudio/pulls{/number}","milestones_url":"https://api.github.com/repos/github/VisualStudio/milestones{/number}","notifications_url":"https://api.github.com/repos/github/VisualStudio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/VisualStudio/labels{/name}","releases_url":"https://api.github.com/repos/github/VisualStudio/releases{/id}","created_at":"2015-06-30T18:11:40Z","updated_at":"2015-10-25T23:30:13Z","pushed_at":"2015-10-27T21:57:53Z","git_url":"git://github.com/github/VisualStudio.git","ssh_url":"git@github.com:github/VisualStudio.git","clone_url":"https://github.com/github/VisualStudio.git","svn_url":"https://github.com/github/VisualStudio","homepage":"https://visualstudio.github.com","size":22806,"stargazers_count":304,"watchers_count":304,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"open_issues_count":33,"forks":77,"open_issues":33,"watchers":304,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/135"},"html":{"href":"https://github.com/github/VisualStudio/pull/135"},"issue":{"href":"https://api.github.com/repos/github/VisualStudio/issues/135"},"comments":{"href":"https://api.github.com/repos/github/VisualStudio/issues/135/comments"},"review_comments":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/135/comments"},"review_comment":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/github/VisualStudio/pulls/135/commits"},"statuses":{"href":"https://api.github.com/repos/github/VisualStudio/statuses/131e229f69a5fcc9b98caca0dc8cc2d4e0148fe3"}}}}