{"action":"created","comment":{"url":"https://api.github.com/repos/uber/arcanist/pulls/comments/183564502","pull_request_review_id":114587110,"id":183564502,"diff_hunk":"@@ -1739,6 +1757,35 @@ private function getCommitMessageFromUser() {\n   }\n \n \n+  private function modifiesPath($paths_to_check, $changes) {\n+    foreach ($changes as $changed_file => $contents) {\n+      if (preg_match($paths_to_check, $changed_file)) {\n+        return true;\n+      }\n+    }\n+    return false;\n+  }\n+\n+  /**\n+   * get revert plan by prompting developer\n+   */\n+  private function getRevertPlan() {\n+    $ff_prompt = 'Is this diff guarded by a feature flag?';\n+    $flagged = phutil_console_confirm($ff_prompt, $default_no = false);\n+    if ($flagged) {\n+      $flagnames = phutil_console_prompt('Flag name:');\n+      return 'Guarded by feature flag ' .  $flagnames;\n+    } else {\n+      $reasons = $this->getConfigurationManager()->getConfigFromAnySource('differential.revert_plan_ommitted_reasons');","path":"src/workflow/ArcanistDiffWorkflow.php","position":93,"original_position":93,"commit_id":"dbe3f3e00621c0da813fc692aecdb4197184f8d3","original_commit_id":"dbe3f3e00621c0da813fc692aecdb4197184f8d3","user":{"login":"msridhar","id":193105,"avatar_url":"https://avatars1.githubusercontent.com/u/193105?v=4","gravatar_id":"","url":"https://api.github.com/users/msridhar","html_url":"https://github.com/msridhar","followers_url":"https://api.github.com/users/msridhar/followers","following_url":"https://api.github.com/users/msridhar/following{/other_user}","gists_url":"https://api.github.com/users/msridhar/gists{/gist_id}","starred_url":"https://api.github.com/users/msridhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msridhar/subscriptions","organizations_url":"https://api.github.com/users/msridhar/orgs","repos_url":"https://api.github.com/users/msridhar/repos","events_url":"https://api.github.com/users/msridhar/events{/privacy}","received_events_url":"https://api.github.com/users/msridhar/received_events","type":"User","site_admin":false},"body":"Ok, in an attempt to not over-engineer this, I'll make it more configurable in a follow-up PR","created_at":"2018-04-23T23:14:16Z","updated_at":"2018-04-23T23:14:16Z","html_url":"https://github.com/uber/arcanist/pull/105#discussion_r183564502","pull_request_url":"https://api.github.com/repos/uber/arcanist/pulls/105","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/uber/arcanist/pulls/comments/183564502"},"html":{"href":"https://github.com/uber/arcanist/pull/105#discussion_r183564502"},"pull_request":{"href":"https://api.github.com/repos/uber/arcanist/pulls/105"}},"in_reply_to_id":181945706},"pull_request":{"url":"https://api.github.com/repos/uber/arcanist/pulls/105","id":182019859,"html_url":"https://github.com/uber/arcanist/pull/105","diff_url":"https://github.com/uber/arcanist/pull/105.diff","patch_url":"https://github.com/uber/arcanist/pull/105.patch","issue_url":"https://api.github.com/repos/uber/arcanist/issues/105","number":105,"state":"open","locked":false,"title":"Add support for enforcing a template for revert plans","user":{"login":"msridhar","id":193105,"avatar_url":"https://avatars1.githubusercontent.com/u/193105?v=4","gravatar_id":"","url":"https://api.github.com/users/msridhar","html_url":"https://github.com/msridhar","followers_url":"https://api.github.com/users/msridhar/followers","following_url":"https://api.github.com/users/msridhar/following{/other_user}","gists_url":"https://api.github.com/users/msridhar/gists{/gist_id}","starred_url":"https://api.github.com/users/msridhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msridhar/subscriptions","organizations_url":"https://api.github.com/users/msridhar/orgs","repos_url":"https://api.github.com/users/msridhar/repos","events_url":"https://api.github.com/users/msridhar/events{/privacy}","received_events_url":"https://api.github.com/users/msridhar/received_events","type":"User","site_admin":false},"body":"When enabled, this change prompts the developer for whether a change is covered by a feature flag or not, and generates an initial revert plan for the diff appropriately.  We introduce two new `.arcconfig` settings:\r\n1. `differential.revert_plan_check_paths`: A regular expression describing paths for which the revert plan templating should be enabled.  If this setting is absent, the feature is disabled.\r\n2. `differential.revert_plan_ommitted_reasons`: An array of strings indicating possible reasons why a diff may not be covered by a feature flag.\r\n\r\nThe logic is mostly straightforward.  The only slightly-intrusive change is that since the revert plan templating should only apply to diffs modifying certain paths, we had to refactor the logic to call `generateChanges()` earlier when the `differential.revert_plan_check_paths` is present.","created_at":"2018-04-17T00:09:18Z","updated_at":"2018-04-23T23:14:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24d5ca30c26b77b5d22ed238c5ab435c55bedc60","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kageiit","id":291148,"avatar_url":"https://avatars0.githubusercontent.com/u/291148?v=4","gravatar_id":"","url":"https://api.github.com/users/kageiit","html_url":"https://github.com/kageiit","followers_url":"https://api.github.com/users/kageiit/followers","following_url":"https://api.github.com/users/kageiit/following{/other_user}","gists_url":"https://api.github.com/users/kageiit/gists{/gist_id}","starred_url":"https://api.github.com/users/kageiit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kageiit/subscriptions","organizations_url":"https://api.github.com/users/kageiit/orgs","repos_url":"https://api.github.com/users/kageiit/repos","events_url":"https://api.github.com/users/kageiit/events{/privacy}","received_events_url":"https://api.github.com/users/kageiit/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/uber/arcanist/pulls/105/commits","review_comments_url":"https://api.github.com/repos/uber/arcanist/pulls/105/comments","review_comment_url":"https://api.github.com/repos/uber/arcanist/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/arcanist/issues/105/comments","statuses_url":"https://api.github.com/repos/uber/arcanist/statuses/dbe3f3e00621c0da813fc692aecdb4197184f8d3","head":{"label":"msridhar:revert-plan-stuff","ref":"revert-plan-stuff","sha":"dbe3f3e00621c0da813fc692aecdb4197184f8d3","user":{"login":"msridhar","id":193105,"avatar_url":"https://avatars1.githubusercontent.com/u/193105?v=4","gravatar_id":"","url":"https://api.github.com/users/msridhar","html_url":"https://github.com/msridhar","followers_url":"https://api.github.com/users/msridhar/followers","following_url":"https://api.github.com/users/msridhar/following{/other_user}","gists_url":"https://api.github.com/users/msridhar/gists{/gist_id}","starred_url":"https://api.github.com/users/msridhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msridhar/subscriptions","organizations_url":"https://api.github.com/users/msridhar/orgs","repos_url":"https://api.github.com/users/msridhar/repos","events_url":"https://api.github.com/users/msridhar/events{/privacy}","received_events_url":"https://api.github.com/users/msridhar/received_events","type":"User","site_admin":false},"repo":{"id":129820817,"name":"arcanist","full_name":"msridhar/arcanist","owner":{"login":"msridhar","id":193105,"avatar_url":"https://avatars1.githubusercontent.com/u/193105?v=4","gravatar_id":"","url":"https://api.github.com/users/msridhar","html_url":"https://github.com/msridhar","followers_url":"https://api.github.com/users/msridhar/followers","following_url":"https://api.github.com/users/msridhar/following{/other_user}","gists_url":"https://api.github.com/users/msridhar/gists{/gist_id}","starred_url":"https://api.github.com/users/msridhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msridhar/subscriptions","organizations_url":"https://api.github.com/users/msridhar/orgs","repos_url":"https://api.github.com/users/msridhar/repos","events_url":"https://api.github.com/users/msridhar/events{/privacy}","received_events_url":"https://api.github.com/users/msridhar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/msridhar/arcanist","description":"Command line interface for Phabricator","fork":true,"url":"https://api.github.com/repos/msridhar/arcanist","forks_url":"https://api.github.com/repos/msridhar/arcanist/forks","keys_url":"https://api.github.com/repos/msridhar/arcanist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/msridhar/arcanist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/msridhar/arcanist/teams","hooks_url":"https://api.github.com/repos/msridhar/arcanist/hooks","issue_events_url":"https://api.github.com/repos/msridhar/arcanist/issues/events{/number}","events_url":"https://api.github.com/repos/msridhar/arcanist/events","assignees_url":"https://api.github.com/repos/msridhar/arcanist/assignees{/user}","branches_url":"https://api.github.com/repos/msridhar/arcanist/branches{/branch}","tags_url":"https://api.github.com/repos/msridhar/arcanist/tags","blobs_url":"https://api.github.com/repos/msridhar/arcanist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/msridhar/arcanist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/msridhar/arcanist/git/refs{/sha}","trees_url":"https://api.github.com/repos/msridhar/arcanist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/msridhar/arcanist/statuses/{sha}","languages_url":"https://api.github.com/repos/msridhar/arcanist/languages","stargazers_url":"https://api.github.com/repos/msridhar/arcanist/stargazers","contributors_url":"https://api.github.com/repos/msridhar/arcanist/contributors","subscribers_url":"https://api.github.com/repos/msridhar/arcanist/subscribers","subscription_url":"https://api.github.com/repos/msridhar/arcanist/subscription","commits_url":"https://api.github.com/repos/msridhar/arcanist/commits{/sha}","git_commits_url":"https://api.github.com/repos/msridhar/arcanist/git/commits{/sha}","comments_url":"https://api.github.com/repos/msridhar/arcanist/comments{/number}","issue_comment_url":"https://api.github.com/repos/msridhar/arcanist/issues/comments{/number}","contents_url":"https://api.github.com/repos/msridhar/arcanist/contents/{+path}","compare_url":"https://api.github.com/repos/msridhar/arcanist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/msridhar/arcanist/merges","archive_url":"https://api.github.com/repos/msridhar/arcanist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/msridhar/arcanist/downloads","issues_url":"https://api.github.com/repos/msridhar/arcanist/issues{/number}","pulls_url":"https://api.github.com/repos/msridhar/arcanist/pulls{/number}","milestones_url":"https://api.github.com/repos/msridhar/arcanist/milestones{/number}","notifications_url":"https://api.github.com/repos/msridhar/arcanist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/msridhar/arcanist/labels{/name}","releases_url":"https://api.github.com/repos/msridhar/arcanist/releases{/id}","deployments_url":"https://api.github.com/repos/msridhar/arcanist/deployments","created_at":"2018-04-17T00:03:14Z","updated_at":"2018-04-17T00:03:17Z","pushed_at":"2018-04-17T00:03:37Z","git_url":"git://github.com/msridhar/arcanist.git","ssh_url":"git@github.com:msridhar/arcanist.git","clone_url":"https://github.com/msridhar/arcanist.git","svn_url":"https://github.com/msridhar/arcanist","homepage":"http://www.phabricator.com/docs/arcanist/","size":7192,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"uber:master","ref":"master","sha":"1162ff24f5c03e18d810329debe47fb792a42f74","user":{"login":"uber","id":538264,"avatar_url":"https://avatars3.githubusercontent.com/u/538264?v=4","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":35919019,"name":"arcanist","full_name":"uber/arcanist","owner":{"login":"uber","id":538264,"avatar_url":"https://avatars3.githubusercontent.com/u/538264?v=4","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/arcanist","description":"Command line interface for Phabricator","fork":true,"url":"https://api.github.com/repos/uber/arcanist","forks_url":"https://api.github.com/repos/uber/arcanist/forks","keys_url":"https://api.github.com/repos/uber/arcanist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/arcanist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/arcanist/teams","hooks_url":"https://api.github.com/repos/uber/arcanist/hooks","issue_events_url":"https://api.github.com/repos/uber/arcanist/issues/events{/number}","events_url":"https://api.github.com/repos/uber/arcanist/events","assignees_url":"https://api.github.com/repos/uber/arcanist/assignees{/user}","branches_url":"https://api.github.com/repos/uber/arcanist/branches{/branch}","tags_url":"https://api.github.com/repos/uber/arcanist/tags","blobs_url":"https://api.github.com/repos/uber/arcanist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/arcanist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/arcanist/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/arcanist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/arcanist/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/arcanist/languages","stargazers_url":"https://api.github.com/repos/uber/arcanist/stargazers","contributors_url":"https://api.github.com/repos/uber/arcanist/contributors","subscribers_url":"https://api.github.com/repos/uber/arcanist/subscribers","subscription_url":"https://api.github.com/repos/uber/arcanist/subscription","commits_url":"https://api.github.com/repos/uber/arcanist/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/arcanist/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/arcanist/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/arcanist/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/arcanist/contents/{+path}","compare_url":"https://api.github.com/repos/uber/arcanist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/arcanist/merges","archive_url":"https://api.github.com/repos/uber/arcanist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/arcanist/downloads","issues_url":"https://api.github.com/repos/uber/arcanist/issues{/number}","pulls_url":"https://api.github.com/repos/uber/arcanist/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/arcanist/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/arcanist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/arcanist/labels{/name}","releases_url":"https://api.github.com/repos/uber/arcanist/releases{/id}","deployments_url":"https://api.github.com/repos/uber/arcanist/deployments","created_at":"2015-05-20T01:42:52Z","updated_at":"2018-04-05T23:17:55Z","pushed_at":"2018-04-17T00:09:19Z","git_url":"git://github.com/uber/arcanist.git","ssh_url":"git@github.com:uber/arcanist.git","clone_url":"https://github.com/uber/arcanist.git","svn_url":"https://github.com/uber/arcanist","homepage":"http://www.phabricator.com/docs/arcanist/","size":7190,"stargazers_count":9,"watchers_count":9,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":19,"open_issues":7,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/arcanist/pulls/105"},"html":{"href":"https://github.com/uber/arcanist/pull/105"},"issue":{"href":"https://api.github.com/repos/uber/arcanist/issues/105"},"comments":{"href":"https://api.github.com/repos/uber/arcanist/issues/105/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/arcanist/pulls/105/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/arcanist/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/arcanist/pulls/105/commits"},"statuses":{"href":"https://api.github.com/repos/uber/arcanist/statuses/dbe3f3e00621c0da813fc692aecdb4197184f8d3"}},"author_association":"NONE"}}
{"actor":{"display_login":"msridhar"}}