{"action":"created","comment":{"url":"https://api.github.com/repos/btkelly/gnag/pulls/comments/201439245","pull_request_review_id":135942198,"id":201439245,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTQzOTI0NQ==","diff_hunk":"@@ -19,26 +19,38 @@ import com.btkelly.gnag.extensions.AndroidLintExtension\n import com.btkelly.gnag.models.Violation\n import com.btkelly.gnag.reporters.utils.LineNumberParser\n import com.btkelly.gnag.reporters.utils.PathCalculator\n+import com.vladsch.flexmark.html.HtmlRenderer\n+import com.vladsch.flexmark.parser.Parser\n+import com.vladsch.flexmark.profiles.pegdown.PegdownOptionsAdapter\n+import com.vladsch.flexmark.util.options.DataHolder\n import groovy.util.slurpersupport.GPathResult\n import org.gradle.api.GradleException\n import org.gradle.api.Project\n-import org.pegdown.PegDownProcessor\n \n import static com.btkelly.gnag.extensions.AndroidLintExtension.SEVERITY_ERROR\n import static com.btkelly.gnag.extensions.AndroidLintExtension.SEVERITY_WARNING\n import static com.btkelly.gnag.utils.StringUtils.sanitizePreservingNulls\n import static com.btkelly.gnag.utils.StringUtils.sanitizeToNonNull\n-import static org.pegdown.Extensions.*\n+import static com.vladsch.flexmark.profiles.pegdown.Extensions.AUTOLINKS\n+import static com.vladsch.flexmark.profiles.pegdown.Extensions.FENCED_CODE_BLOCKS\n+import static com.vladsch.flexmark.profiles.pegdown.Extensions.HARDWRAPS\n \n class AndroidLintViolationDetector extends BaseViolationDetector {\n \n-    private static final int GFM_PEGDOWN_PROCESSOR_EXTENSIONS = HARDWRAPS | AUTOLINKS | FENCED_CODE_BLOCKS\n+    private static final int FLEXMARK_GFM_OPTIONS = HARDWRAPS | AUTOLINKS | FENCED_CODE_BLOCKS\n \n     private final AndroidLintExtension androidLintExtension\n \n+    private final Parser parser\n+    private final HtmlRenderer renderer\n+\n     AndroidLintViolationDetector(final Project project, final AndroidLintExtension androidLintExtension) {\n         super(project)\n         this.androidLintExtension = androidLintExtension\n+\n+        final DataHolder options = PegdownOptionsAdapter.flexmarkOptions(FLEXMARK_GFM_OPTIONS)\n+        parser = Parser.builder(options).build()\n+        renderer = HtmlRenderer.builder().build()","path":"plugin/src/main/groovy/com/btkelly/gnag/reporters/AndroidLintViolationDetector.groovy","position":38,"original_position":38,"commit_id":"ee4c2c7383f3c947d4707a23c9a82ce621963fda","original_commit_id":"ee4c2c7383f3c947d4707a23c9a82ce621963fda","user":{"login":"stkent","id":6463980,"node_id":"MDQ6VXNlcjY0NjM5ODA=","avatar_url":"https://avatars1.githubusercontent.com/u/6463980?v=4","gravatar_id":"","url":"https://api.github.com/users/stkent","html_url":"https://github.com/stkent","followers_url":"https://api.github.com/users/stkent/followers","following_url":"https://api.github.com/users/stkent/following{/other_user}","gists_url":"https://api.github.com/users/stkent/gists{/gist_id}","starred_url":"https://api.github.com/users/stkent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stkent/subscriptions","organizations_url":"https://api.github.com/users/stkent/orgs","repos_url":"https://api.github.com/users/stkent/repos","events_url":"https://api.github.com/users/stkent/events{/privacy}","received_events_url":"https://api.github.com/users/stkent/received_events","type":"User","site_admin":false},"body":"Now shared rather than recreated for each comment 🌻 ","created_at":"2018-07-10T18:00:00Z","updated_at":"2018-07-10T18:00:01Z","html_url":"https://github.com/btkelly/gnag/pull/182#discussion_r201439245","pull_request_url":"https://api.github.com/repos/btkelly/gnag/pulls/182","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/btkelly/gnag/pulls/comments/201439245"},"html":{"href":"https://github.com/btkelly/gnag/pull/182#discussion_r201439245"},"pull_request":{"href":"https://api.github.com/repos/btkelly/gnag/pulls/182"}}},"pull_request":{"url":"https://api.github.com/repos/btkelly/gnag/pulls/182","id":200478253,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNDc4MjUz","html_url":"https://github.com/btkelly/gnag/pull/182","diff_url":"https://github.com/btkelly/gnag/pull/182.diff","patch_url":"https://github.com/btkelly/gnag/pull/182.patch","issue_url":"https://api.github.com/repos/btkelly/gnag/issues/182","number":182,"state":"open","locked":false,"title":"Replace pegdown with flexmark","user":{"login":"stkent","id":6463980,"node_id":"MDQ6VXNlcjY0NjM5ODA=","avatar_url":"https://avatars1.githubusercontent.com/u/6463980?v=4","gravatar_id":"","url":"https://api.github.com/users/stkent","html_url":"https://github.com/stkent","followers_url":"https://api.github.com/users/stkent/followers","following_url":"https://api.github.com/users/stkent/following{/other_user}","gists_url":"https://api.github.com/users/stkent/gists{/gist_id}","starred_url":"https://api.github.com/users/stkent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stkent/subscriptions","organizations_url":"https://api.github.com/users/stkent/orgs","repos_url":"https://api.github.com/users/stkent/repos","events_url":"https://api.github.com/users/stkent/events{/privacy}","received_events_url":"https://api.github.com/users/stkent/received_events","type":"User","site_admin":false},"body":"Closes #175 \r\n\r\nSee commit message for details.","created_at":"2018-07-10T17:59:36Z","updated_at":"2018-07-10T18:00:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee50604ee9788045c48a67e32924d6cc23df6c57","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/btkelly/gnag/pulls/182/commits","review_comments_url":"https://api.github.com/repos/btkelly/gnag/pulls/182/comments","review_comment_url":"https://api.github.com/repos/btkelly/gnag/pulls/comments{/number}","comments_url":"https://api.github.com/repos/btkelly/gnag/issues/182/comments","statuses_url":"https://api.github.com/repos/btkelly/gnag/statuses/ee4c2c7383f3c947d4707a23c9a82ce621963fda","head":{"label":"btkelly:replace-pegdown","ref":"replace-pegdown","sha":"ee4c2c7383f3c947d4707a23c9a82ce621963fda","user":{"login":"btkelly","id":826036,"node_id":"MDQ6VXNlcjgyNjAzNg==","avatar_url":"https://avatars0.githubusercontent.com/u/826036?v=4","gravatar_id":"","url":"https://api.github.com/users/btkelly","html_url":"https://github.com/btkelly","followers_url":"https://api.github.com/users/btkelly/followers","following_url":"https://api.github.com/users/btkelly/following{/other_user}","gists_url":"https://api.github.com/users/btkelly/gists{/gist_id}","starred_url":"https://api.github.com/users/btkelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btkelly/subscriptions","organizations_url":"https://api.github.com/users/btkelly/orgs","repos_url":"https://api.github.com/users/btkelly/repos","events_url":"https://api.github.com/users/btkelly/events{/privacy}","received_events_url":"https://api.github.com/users/btkelly/received_events","type":"User","site_admin":false},"repo":{"id":45197311,"node_id":"MDEwOlJlcG9zaXRvcnk0NTE5NzMxMQ==","name":"gnag","full_name":"btkelly/gnag","owner":{"login":"btkelly","id":826036,"node_id":"MDQ6VXNlcjgyNjAzNg==","avatar_url":"https://avatars0.githubusercontent.com/u/826036?v=4","gravatar_id":"","url":"https://api.github.com/users/btkelly","html_url":"https://github.com/btkelly","followers_url":"https://api.github.com/users/btkelly/followers","following_url":"https://api.github.com/users/btkelly/following{/other_user}","gists_url":"https://api.github.com/users/btkelly/gists{/gist_id}","starred_url":"https://api.github.com/users/btkelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btkelly/subscriptions","organizations_url":"https://api.github.com/users/btkelly/orgs","repos_url":"https://api.github.com/users/btkelly/repos","events_url":"https://api.github.com/users/btkelly/events{/privacy}","received_events_url":"https://api.github.com/users/btkelly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/btkelly/gnag","description":"A Gradle plugin that helps facilitate GitHub PR checking and automatic commenting of violations.","fork":false,"url":"https://api.github.com/repos/btkelly/gnag","forks_url":"https://api.github.com/repos/btkelly/gnag/forks","keys_url":"https://api.github.com/repos/btkelly/gnag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/btkelly/gnag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/btkelly/gnag/teams","hooks_url":"https://api.github.com/repos/btkelly/gnag/hooks","issue_events_url":"https://api.github.com/repos/btkelly/gnag/issues/events{/number}","events_url":"https://api.github.com/repos/btkelly/gnag/events","assignees_url":"https://api.github.com/repos/btkelly/gnag/assignees{/user}","branches_url":"https://api.github.com/repos/btkelly/gnag/branches{/branch}","tags_url":"https://api.github.com/repos/btkelly/gnag/tags","blobs_url":"https://api.github.com/repos/btkelly/gnag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/btkelly/gnag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/btkelly/gnag/git/refs{/sha}","trees_url":"https://api.github.com/repos/btkelly/gnag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/btkelly/gnag/statuses/{sha}","languages_url":"https://api.github.com/repos/btkelly/gnag/languages","stargazers_url":"https://api.github.com/repos/btkelly/gnag/stargazers","contributors_url":"https://api.github.com/repos/btkelly/gnag/contributors","subscribers_url":"https://api.github.com/repos/btkelly/gnag/subscribers","subscription_url":"https://api.github.com/repos/btkelly/gnag/subscription","commits_url":"https://api.github.com/repos/btkelly/gnag/commits{/sha}","git_commits_url":"https://api.github.com/repos/btkelly/gnag/git/commits{/sha}","comments_url":"https://api.github.com/repos/btkelly/gnag/comments{/number}","issue_comment_url":"https://api.github.com/repos/btkelly/gnag/issues/comments{/number}","contents_url":"https://api.github.com/repos/btkelly/gnag/contents/{+path}","compare_url":"https://api.github.com/repos/btkelly/gnag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/btkelly/gnag/merges","archive_url":"https://api.github.com/repos/btkelly/gnag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/btkelly/gnag/downloads","issues_url":"https://api.github.com/repos/btkelly/gnag/issues{/number}","pulls_url":"https://api.github.com/repos/btkelly/gnag/pulls{/number}","milestones_url":"https://api.github.com/repos/btkelly/gnag/milestones{/number}","notifications_url":"https://api.github.com/repos/btkelly/gnag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/btkelly/gnag/labels{/name}","releases_url":"https://api.github.com/repos/btkelly/gnag/releases{/id}","deployments_url":"https://api.github.com/repos/btkelly/gnag/deployments","created_at":"2015-10-29T16:52:59Z","updated_at":"2018-07-10T17:37:59Z","pushed_at":"2018-07-10T17:59:36Z","git_url":"git://github.com/btkelly/gnag.git","ssh_url":"git@github.com:btkelly/gnag.git","clone_url":"https://github.com/btkelly/gnag.git","svn_url":"https://github.com/btkelly/gnag","homepage":"http://gnag.watch","size":709,"stargazers_count":77,"watchers_count":77,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":21,"watchers":77,"default_branch":"master"}},"base":{"label":"btkelly:master","ref":"master","sha":"0fce8438c3b899a08846fb39de44867a9886ce39","user":{"login":"btkelly","id":826036,"node_id":"MDQ6VXNlcjgyNjAzNg==","avatar_url":"https://avatars0.githubusercontent.com/u/826036?v=4","gravatar_id":"","url":"https://api.github.com/users/btkelly","html_url":"https://github.com/btkelly","followers_url":"https://api.github.com/users/btkelly/followers","following_url":"https://api.github.com/users/btkelly/following{/other_user}","gists_url":"https://api.github.com/users/btkelly/gists{/gist_id}","starred_url":"https://api.github.com/users/btkelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btkelly/subscriptions","organizations_url":"https://api.github.com/users/btkelly/orgs","repos_url":"https://api.github.com/users/btkelly/repos","events_url":"https://api.github.com/users/btkelly/events{/privacy}","received_events_url":"https://api.github.com/users/btkelly/received_events","type":"User","site_admin":false},"repo":{"id":45197311,"node_id":"MDEwOlJlcG9zaXRvcnk0NTE5NzMxMQ==","name":"gnag","full_name":"btkelly/gnag","owner":{"login":"btkelly","id":826036,"node_id":"MDQ6VXNlcjgyNjAzNg==","avatar_url":"https://avatars0.githubusercontent.com/u/826036?v=4","gravatar_id":"","url":"https://api.github.com/users/btkelly","html_url":"https://github.com/btkelly","followers_url":"https://api.github.com/users/btkelly/followers","following_url":"https://api.github.com/users/btkelly/following{/other_user}","gists_url":"https://api.github.com/users/btkelly/gists{/gist_id}","starred_url":"https://api.github.com/users/btkelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btkelly/subscriptions","organizations_url":"https://api.github.com/users/btkelly/orgs","repos_url":"https://api.github.com/users/btkelly/repos","events_url":"https://api.github.com/users/btkelly/events{/privacy}","received_events_url":"https://api.github.com/users/btkelly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/btkelly/gnag","description":"A Gradle plugin that helps facilitate GitHub PR checking and automatic commenting of violations.","fork":false,"url":"https://api.github.com/repos/btkelly/gnag","forks_url":"https://api.github.com/repos/btkelly/gnag/forks","keys_url":"https://api.github.com/repos/btkelly/gnag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/btkelly/gnag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/btkelly/gnag/teams","hooks_url":"https://api.github.com/repos/btkelly/gnag/hooks","issue_events_url":"https://api.github.com/repos/btkelly/gnag/issues/events{/number}","events_url":"https://api.github.com/repos/btkelly/gnag/events","assignees_url":"https://api.github.com/repos/btkelly/gnag/assignees{/user}","branches_url":"https://api.github.com/repos/btkelly/gnag/branches{/branch}","tags_url":"https://api.github.com/repos/btkelly/gnag/tags","blobs_url":"https://api.github.com/repos/btkelly/gnag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/btkelly/gnag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/btkelly/gnag/git/refs{/sha}","trees_url":"https://api.github.com/repos/btkelly/gnag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/btkelly/gnag/statuses/{sha}","languages_url":"https://api.github.com/repos/btkelly/gnag/languages","stargazers_url":"https://api.github.com/repos/btkelly/gnag/stargazers","contributors_url":"https://api.github.com/repos/btkelly/gnag/contributors","subscribers_url":"https://api.github.com/repos/btkelly/gnag/subscribers","subscription_url":"https://api.github.com/repos/btkelly/gnag/subscription","commits_url":"https://api.github.com/repos/btkelly/gnag/commits{/sha}","git_commits_url":"https://api.github.com/repos/btkelly/gnag/git/commits{/sha}","comments_url":"https://api.github.com/repos/btkelly/gnag/comments{/number}","issue_comment_url":"https://api.github.com/repos/btkelly/gnag/issues/comments{/number}","contents_url":"https://api.github.com/repos/btkelly/gnag/contents/{+path}","compare_url":"https://api.github.com/repos/btkelly/gnag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/btkelly/gnag/merges","archive_url":"https://api.github.com/repos/btkelly/gnag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/btkelly/gnag/downloads","issues_url":"https://api.github.com/repos/btkelly/gnag/issues{/number}","pulls_url":"https://api.github.com/repos/btkelly/gnag/pulls{/number}","milestones_url":"https://api.github.com/repos/btkelly/gnag/milestones{/number}","notifications_url":"https://api.github.com/repos/btkelly/gnag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/btkelly/gnag/labels{/name}","releases_url":"https://api.github.com/repos/btkelly/gnag/releases{/id}","deployments_url":"https://api.github.com/repos/btkelly/gnag/deployments","created_at":"2015-10-29T16:52:59Z","updated_at":"2018-07-10T17:37:59Z","pushed_at":"2018-07-10T17:59:36Z","git_url":"git://github.com/btkelly/gnag.git","ssh_url":"git@github.com:btkelly/gnag.git","clone_url":"https://github.com/btkelly/gnag.git","svn_url":"https://github.com/btkelly/gnag","homepage":"http://gnag.watch","size":709,"stargazers_count":77,"watchers_count":77,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":21,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/btkelly/gnag/pulls/182"},"html":{"href":"https://github.com/btkelly/gnag/pull/182"},"issue":{"href":"https://api.github.com/repos/btkelly/gnag/issues/182"},"comments":{"href":"https://api.github.com/repos/btkelly/gnag/issues/182/comments"},"review_comments":{"href":"https://api.github.com/repos/btkelly/gnag/pulls/182/comments"},"review_comment":{"href":"https://api.github.com/repos/btkelly/gnag/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/btkelly/gnag/pulls/182/commits"},"statuses":{"href":"https://api.github.com/repos/btkelly/gnag/statuses/ee4c2c7383f3c947d4707a23c9a82ce621963fda"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"stkent"}}