{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/237240488","pull_request_review_id":179491657,"id":237240488,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzI0MDQ4OA==","diff_hunk":"@@ -0,0 +1,43 @@\n+﻿// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.\n+\n+using System.Composition;\n+using Microsoft.CodeAnalysis.CodeRefactorings;\n+using Microsoft.CodeAnalysis.CodeRefactorings.PullMemberUp;\n+using Microsoft.CodeAnalysis.CSharp.Extensions;\n+using Microsoft.CodeAnalysis.CSharp.Syntax;\n+using Microsoft.CodeAnalysis.Text;\n+\n+namespace Microsoft.CodeAnalysis.CSharp.CodeRefactorings.PullMemberUp\n+{\n+    [ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = nameof(PredefinedCodeRefactoringProviderNames.PullMember)), Shared]\n+    internal class CSharpPullMemberUpCodeRefactoringProvider : AbstractPullMemberUpRefactoringProvider\n+    {\n+        protected override bool IsSelectionValid(TextSpan span, SyntaxNode userSelectedSyntax)\n+        {\n+            var identifier = GetIdentifier(userSelectedSyntax);\n+            if (identifier == default)\n+            {\n+                return false;\n+            }\n+            else\n+            {\n+                return (identifier.FullSpan.Contains(span) && span.Contains(identifier.Span)) ||  \n+                    (identifier.Span.Contains(span) && span.Length == 0);\n+            }\n+        }\n+\n+        private SyntaxToken GetIdentifier(SyntaxNode userSelectedSyntax)\n+        {\n+            switch (userSelectedSyntax)\n+            {\n+                case MemberDeclarationSyntax memberDeclarationSyntax:","path":"src/Features/CSharp/Portable/CodeRefactorings/PullMemberUp/CSharpPullMemberUpCodeRefactoringProvider.cs","position":42,"original_position":33,"commit_id":"f679493c73dd0fc7ce0f63bae616ccadd17fa5ce","original_commit_id":"de1c29f4ffae150e32ca31fb05e3c3504c5a3162","user":{"login":"CyrusNajmabadi","id":4564579,"node_id":"MDQ6VXNlcjQ1NjQ1Nzk=","avatar_url":"https://avatars3.githubusercontent.com/u/4564579?v=4","gravatar_id":"","url":"https://api.github.com/users/CyrusNajmabadi","html_url":"https://github.com/CyrusNajmabadi","followers_url":"https://api.github.com/users/CyrusNajmabadi/followers","following_url":"https://api.github.com/users/CyrusNajmabadi/following{/other_user}","gists_url":"https://api.github.com/users/CyrusNajmabadi/gists{/gist_id}","starred_url":"https://api.github.com/users/CyrusNajmabadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyrusNajmabadi/subscriptions","organizations_url":"https://api.github.com/users/CyrusNajmabadi/orgs","repos_url":"https://api.github.com/users/CyrusNajmabadi/repos","events_url":"https://api.github.com/users/CyrusNajmabadi/events{/privacy}","received_events_url":"https://api.github.com/users/CyrusNajmabadi/received_events","type":"User","site_admin":false},"body":"A unit test would be good.  Specifically, because it means that if we change this logic in the future, but miss that realization, we won't end up with bad behavior unintentionally.  Thanks!","created_at":"2018-11-28T20:02:23Z","updated_at":"2018-11-28T20:02:23Z","html_url":"https://github.com/dotnet/roslyn/pull/31211#discussion_r237240488","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/31211","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/237240488"},"html":{"href":"https://github.com/dotnet/roslyn/pull/31211#discussion_r237240488"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/31211"}},"in_reply_to_id":234072481},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/31211","id":231381535,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMzgxNTM1","html_url":"https://github.com/dotnet/roslyn/pull/31211","diff_url":"https://github.com/dotnet/roslyn/pull/31211.diff","patch_url":"https://github.com/dotnet/roslyn/pull/31211.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/31211","number":31211,"state":"open","locked":false,"title":"Pull Members Up via quick action","user":{"login":"Cosifne","id":24360909,"node_id":"MDQ6VXNlcjI0MzYwOTA5","avatar_url":"https://avatars2.githubusercontent.com/u/24360909?v=4","gravatar_id":"","url":"https://api.github.com/users/Cosifne","html_url":"https://github.com/Cosifne","followers_url":"https://api.github.com/users/Cosifne/followers","following_url":"https://api.github.com/users/Cosifne/following{/other_user}","gists_url":"https://api.github.com/users/Cosifne/gists{/gist_id}","starred_url":"https://api.github.com/users/Cosifne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cosifne/subscriptions","organizations_url":"https://api.github.com/users/Cosifne/orgs","repos_url":"https://api.github.com/users/Cosifne/repos","events_url":"https://api.github.com/users/Cosifne/events{/privacy}","received_events_url":"https://api.github.com/users/Cosifne/received_events","type":"User","site_admin":false},"body":"Origin [PR]: (https://github.com/dotnet/roslyn/pull/30254)\r\n\r\nThis PR is created to separate the quick action part from origin PR for easily review and modify.\r\n\r\nUI:\r\n![pullmemberupuiquickaction](https://user-images.githubusercontent.com/24360909/48590638-229ac500-e8f5-11e8-8efb-509ab7c59950.gif)\r\n\r\nTo do List\r\n- [x] Add test for multi-language scenario\r\n\r\n- [x] Move expensive check into CodeAction\r\n","created_at":"2018-11-16T00:41:06Z","updated_at":"2018-11-28T20:02:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ab819ea48b71fdb540d3ce14a6b1bcd18f662a0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":166377917,"node_id":"MDU6TGFiZWwxNjYzNzc5MTc=","url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-IDE","name":"Area-IDE","color":"5319e7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/31211/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/31211/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/31211/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/f679493c73dd0fc7ce0f63bae616ccadd17fa5ce","head":{"label":"Cosifne:shech/push_member_quick_action","ref":"shech/push_member_quick_action","sha":"f679493c73dd0fc7ce0f63bae616ccadd17fa5ce","user":{"login":"Cosifne","id":24360909,"node_id":"MDQ6VXNlcjI0MzYwOTA5","avatar_url":"https://avatars2.githubusercontent.com/u/24360909?v=4","gravatar_id":"","url":"https://api.github.com/users/Cosifne","html_url":"https://github.com/Cosifne","followers_url":"https://api.github.com/users/Cosifne/followers","following_url":"https://api.github.com/users/Cosifne/following{/other_user}","gists_url":"https://api.github.com/users/Cosifne/gists{/gist_id}","starred_url":"https://api.github.com/users/Cosifne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cosifne/subscriptions","organizations_url":"https://api.github.com/users/Cosifne/orgs","repos_url":"https://api.github.com/users/Cosifne/repos","events_url":"https://api.github.com/users/Cosifne/events{/privacy}","received_events_url":"https://api.github.com/users/Cosifne/received_events","type":"User","site_admin":false},"repo":{"id":151172631,"node_id":"MDEwOlJlcG9zaXRvcnkxNTExNzI2MzE=","name":"roslyn","full_name":"Cosifne/roslyn","private":false,"owner":{"login":"Cosifne","id":24360909,"node_id":"MDQ6VXNlcjI0MzYwOTA5","avatar_url":"https://avatars2.githubusercontent.com/u/24360909?v=4","gravatar_id":"","url":"https://api.github.com/users/Cosifne","html_url":"https://github.com/Cosifne","followers_url":"https://api.github.com/users/Cosifne/followers","following_url":"https://api.github.com/users/Cosifne/following{/other_user}","gists_url":"https://api.github.com/users/Cosifne/gists{/gist_id}","starred_url":"https://api.github.com/users/Cosifne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cosifne/subscriptions","organizations_url":"https://api.github.com/users/Cosifne/orgs","repos_url":"https://api.github.com/users/Cosifne/repos","events_url":"https://api.github.com/users/Cosifne/events{/privacy}","received_events_url":"https://api.github.com/users/Cosifne/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Cosifne/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/Cosifne/roslyn","forks_url":"https://api.github.com/repos/Cosifne/roslyn/forks","keys_url":"https://api.github.com/repos/Cosifne/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cosifne/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cosifne/roslyn/teams","hooks_url":"https://api.github.com/repos/Cosifne/roslyn/hooks","issue_events_url":"https://api.github.com/repos/Cosifne/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/Cosifne/roslyn/events","assignees_url":"https://api.github.com/repos/Cosifne/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/Cosifne/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/Cosifne/roslyn/tags","blobs_url":"https://api.github.com/repos/Cosifne/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cosifne/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cosifne/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cosifne/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cosifne/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/Cosifne/roslyn/languages","stargazers_url":"https://api.github.com/repos/Cosifne/roslyn/stargazers","contributors_url":"https://api.github.com/repos/Cosifne/roslyn/contributors","subscribers_url":"https://api.github.com/repos/Cosifne/roslyn/subscribers","subscription_url":"https://api.github.com/repos/Cosifne/roslyn/subscription","commits_url":"https://api.github.com/repos/Cosifne/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cosifne/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cosifne/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cosifne/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cosifne/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/Cosifne/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cosifne/roslyn/merges","archive_url":"https://api.github.com/repos/Cosifne/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cosifne/roslyn/downloads","issues_url":"https://api.github.com/repos/Cosifne/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/Cosifne/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/Cosifne/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/Cosifne/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cosifne/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/Cosifne/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/Cosifne/roslyn/deployments","created_at":"2018-10-01T23:07:49Z","updated_at":"2018-11-27T00:30:55Z","pushed_at":"2018-11-28T09:04:26Z","git_url":"git://github.com/Cosifne/roslyn.git","ssh_url":"git@github.com:Cosifne/roslyn.git","clone_url":"https://github.com/Cosifne/roslyn.git","svn_url":"https://github.com/Cosifne/roslyn","homepage":"","size":482936,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"e87464c07983b315941a6390ca832b169b656d32","user":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29078997,"node_id":"MDEwOlJlcG9zaXRvcnkyOTA3ODk5Nw==","name":"roslyn","full_name":"dotnet/roslyn","private":false,"owner":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dotnet/roslyn","description":"The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/roslyn/deployments","created_at":"2015-01-11T02:39:03Z","updated_at":"2018-11-28T18:42:45Z","pushed_at":"2018-11-28T19:41:59Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/","size":491160,"stargazers_count":10406,"watchers_count":10406,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2468,"mirror_url":null,"archived":false,"open_issues_count":5443,"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":2468,"open_issues":5443,"watchers":10406,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/31211"},"html":{"href":"https://github.com/dotnet/roslyn/pull/31211"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/31211"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/31211/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/31211/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/31211/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/f679493c73dd0fc7ce0f63bae616ccadd17fa5ce"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"CyrusNajmabadi"}}