payload: {"action":"created","comment":{"url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments/291613567","pull_request_review_id":247123429,"id":291613567,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5MTYxMzU2Nw==","diff_hunk":"@@ -0,0 +1,1381 @@\n+{\n+  title: 'Clover',\n+\n+  methods: {\n+    make_schema_builder_fields_sticky: lambda do |input|\n+      input.map do |field|\n+        if field[:properties].present?\n+          field[:properties] = call('make_schema_builder_fields_sticky',\n+                                    field[:properties])\n+        elsif field['properties'].present?\n+          field['properties'] = call('make_schema_builder_fields_sticky',\n+                                     field['properties'])\n+        end\n+        field[:sticky] = true\n+        field\n+      end\n+    end\n+  },\n+\n+  connection: {\n+    fields: [\n+      {\n+        name: 'merchant_id',\n+        label: 'Merchant ID',\n+        hint: 'The merchant ID is part of the URL used to access the Clover ' \\\n+          'merchant website. E.g.: https://sandbox.dev.clover.com' \\\n+          '/home/m/<b>{Merchant_ID}</b>',\n+        optional: false\n+      },\n+      {\n+        name: 'environment',\n+        control_type: 'select',\n+        pick_list: [\n+          %w[Production-US api],\n+          %w[Production-Europe api.eu],\n+          %w[Sandbox apisandbox.dev]\n+        ],\n+        optional: false\n+      },\n+      {\n+        name: 'api_key',\n+        hint: 'You can find the API Token by navigating to <b> Setup >> API ' \\\n+          'Tokens</b>. Generate token, if there is not one already generated.',\n+        control_type: 'password',\n+        optional: false\n+      }\n+    ],\n+\n+    base_uri: lambda do |connection|\n+      \"https://#{connection['environment']}.clover.com\"\n+    end,\n+\n+    authorization: {\n+      type: 'api_key',\n+\n+      apply: lambda { |connection|\n+        headers('Authorization' => \"Bearer #{connection['api_key']}\")\n+      }\n+    }\n+  },\n+\n+  test: ->(connection) { get(\"/v3/merchants/#{connection['merchant_id']}\") },\n+\n+  object_definitions: {\n+    custom_action_input: {\n+      fields: lambda do |connection, config_fields|\n+        input_schema = parse_json(config_fields.dig('input', 'schema') || '[]')\n+\n+        [\n+          {\n+            name: 'path',\n+            optional: false,\n+            hint: \"Base URI is <b>https://#{connection['environment']}\" \\\n+              '.clover.com</b> - path will be appended to this URI. ' \\\n+              'Use absolute URI to override this base URI.'\n+          },\n+          (\n+            if %w[get delete].include?(config_fields['verb'])\n+              {\n+                name: 'input',\n+                type: 'object',\n+                control_type: 'form-schema-builder',\n+                sticky: input_schema.blank?,\n+                label: 'URL parameters',\n+                add_field_label: 'Add URL parameter',\n+                properties: [\n+                  {\n+                    name: 'schema',\n+                    extends_schema: true,\n+                    sticky: input_schema.blank?\n+                  },\n+                  (\n+                    if input_schema.present?\n+                      {\n+                        name: 'data',\n+                        type: 'object',\n+                        properties: call('make_schema_builder_fields_sticky',\n+                                         input_schema)\n+                      }\n+                    end\n+                  )\n+                ].compact\n+              }\n+            else\n+              {\n+                name: 'input',\n+                type: 'object',\n+                properties: [\n+                  {\n+                    name: 'schema',\n+                    extends_schema: true,\n+                    schema_neutral: true,\n+                    control_type: 'schema-designer',\n+                    sample_data_type: 'json_input',\n+                    sticky: input_schema.blank?,\n+                    label: 'Request body parameters',\n+                    add_field_label: 'Add request body parameter'\n+                  },\n+                  (\n+                    if input_schema.present?\n+                      {\n+                        name: 'data',\n+                        type: 'object',\n+                        properties: input_schema\n+                          .each { |field| field[:sticky] = true }\n+                      }\n+                    end\n+                  )\n+                ].compact\n+              }\n+            end\n+          ),\n+          {\n+            name: 'output',\n+            control_type: 'schema-designer',\n+            sample_data_type: 'json_http',\n+            extends_schema: true,\n+            schema_neutral: true,\n+            sticky: true\n+          }\n+        ]\n+      end\n+    },\n+\n+    custom_action_output: {\n+      fields: lambda do |_connection, config_fields|\n+        parse_json(config_fields['output'] || '[]')\n+      end\n+    },\n+\n+    employee: {\n+      fields: lambda do |_connection, _config_fields|","path":"custom_connectors/api_key_auth/clover.rb","position":152,"original_position":152,"commit_id":"3190b975b33fb6b65e7375cb5addff47facd9e85","original_commit_id":"3190b975b33fb6b65e7375cb5addff47facd9e85","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Metrics/BlockLength: Block has too many lines. [169/25]","created_at":"2019-06-07T14:20:57Z","updated_at":"2019-06-07T14:20:57Z","html_url":"https://github.com/workato/custom_connector_docs/pull/60#discussion_r291613567","pull_request_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/60","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments/291613567"},"html":{"href":"https://github.com/workato/custom_connector_docs/pull/60#discussion_r291613567"},"pull_request":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/60","id":286208955,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg2MjA4OTU1","html_url":"https://github.com/workato/custom_connector_docs/pull/60","diff_url":"https://github.com/workato/custom_connector_docs/pull/60.diff","patch_url":"https://github.com/workato/custom_connector_docs/pull/60.patch","issue_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/60","number":60,"state":"open","locked":false,"title":"Create clover.rb","user":{"login":"wilsonliaows","id":43787383,"node_id":"MDQ6VXNlcjQzNzg3Mzgz","avatar_url":"https://avatars2.githubusercontent.com/u/43787383?v=4","gravatar_id":"","url":"https://api.github.com/users/wilsonliaows","html_url":"https://github.com/wilsonliaows","followers_url":"https://api.github.com/users/wilsonliaows/followers","following_url":"https://api.github.com/users/wilsonliaows/following{/other_user}","gists_url":"https://api.github.com/users/wilsonliaows/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonliaows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonliaows/subscriptions","organizations_url":"https://api.github.com/users/wilsonliaows/orgs","repos_url":"https://api.github.com/users/wilsonliaows/repos","events_url":"https://api.github.com/users/wilsonliaows/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonliaows/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-06-07T14:20:51Z","updated_at":"2019-06-07T14:20:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5db1793024ab5aa4010aeea91284a40db69ce585","assignee":null,"assignees":[],"requested_reviewers":[{"login":"bryanyap","id":5821001,"node_id":"MDQ6VXNlcjU4MjEwMDE=","avatar_url":"https://avatars1.githubusercontent.com/u/5821001?v=4","gravatar_id":"","url":"https://api.github.com/users/bryanyap","html_url":"https://github.com/bryanyap","followers_url":"https://api.github.com/users/bryanyap/followers","following_url":"https://api.github.com/users/bryanyap/following{/other_user}","gists_url":"https://api.github.com/users/bryanyap/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanyap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanyap/subscriptions","organizations_url":"https://api.github.com/users/bryanyap/orgs","repos_url":"https://api.github.com/users/bryanyap/repos","events_url":"https://api.github.com/users/bryanyap/events{/privacy}","received_events_url":"https://api.github.com/users/bryanyap/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/60/commits","review_comments_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/60/comments","review_comment_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/60/comments","statuses_url":"https://api.github.com/repos/workato/custom_connector_docs/statuses/3190b975b33fb6b65e7375cb5addff47facd9e85","head":{"label":"workato:wilsonliaows-patch-8","ref":"wilsonliaows-patch-8","sha":"3190b975b33fb6b65e7375cb5addff47facd9e85","user":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"repo":{"id":143073259,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMwNzMyNTk=","name":"custom_connector_docs","full_name":"workato/custom_connector_docs","private":false,"owner":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/workato/custom_connector_docs","description":null,"fork":false,"url":"https://api.github.com/repos/workato/custom_connector_docs","forks_url":"https://api.github.com/repos/workato/custom_connector_docs/forks","keys_url":"https://api.github.com/repos/workato/custom_connector_docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/workato/custom_connector_docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/workato/custom_connector_docs/teams","hooks_url":"https://api.github.com/repos/workato/custom_connector_docs/hooks","issue_events_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/events{/number}","events_url":"https://api.github.com/repos/workato/custom_connector_docs/events","assignees_url":"https://api.github.com/repos/workato/custom_connector_docs/assignees{/user}","branches_url":"https://api.github.com/repos/workato/custom_connector_docs/branches{/branch}","tags_url":"https://api.github.com/repos/workato/custom_connector_docs/tags","blobs_url":"https://api.github.com/repos/workato/custom_connector_docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/workato/custom_connector_docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/workato/custom_connector_docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/workato/custom_connector_docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/workato/custom_connector_docs/statuses/{sha}","languages_url":"https://api.github.com/repos/workato/custom_connector_docs/languages","stargazers_url":"https://api.github.com/repos/workato/custom_connector_docs/stargazers","contributors_url":"https://api.github.com/repos/workato/custom_connector_docs/contributors","subscribers_url":"https://api.github.com/repos/workato/custom_connector_docs/subscribers","subscription_url":"https://api.github.com/repos/workato/custom_connector_docs/subscription","commits_url":"https://api.github.com/repos/workato/custom_connector_docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/workato/custom_connector_docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/workato/custom_connector_docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/workato/custom_connector_docs/contents/{+path}","compare_url":"https://api.github.com/repos/workato/custom_connector_docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/workato/custom_connector_docs/merges","archive_url":"https://api.github.com/repos/workato/custom_connector_docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/workato/custom_connector_docs/downloads","issues_url":"https://api.github.com/repos/workato/custom_connector_docs/issues{/number}","pulls_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls{/number}","milestones_url":"https://api.github.com/repos/workato/custom_connector_docs/milestones{/number}","notifications_url":"https://api.github.com/repos/workato/custom_connector_docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/workato/custom_connector_docs/labels{/name}","releases_url":"https://api.github.com/repos/workato/custom_connector_docs/releases{/id}","deployments_url":"https://api.github.com/repos/workato/custom_connector_docs/deployments","created_at":"2018-07-31T21:44:08Z","updated_at":"2019-06-04T16:39:04Z","pushed_at":"2019-06-07T14:20:51Z","git_url":"git://github.com/workato/custom_connector_docs.git","ssh_url":"git@github.com:workato/custom_connector_docs.git","clone_url":"https://github.com/workato/custom_connector_docs.git","svn_url":"https://github.com/workato/custom_connector_docs","homepage":null,"size":1309,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":18,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":13,"license":null,"forks":18,"open_issues":13,"watchers":5,"default_branch":"master"}},"base":{"label":"workato:master","ref":"master","sha":"868be0a300175f9f2a53ab33169bf0afcce4cac6","user":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"repo":{"id":143073259,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMwNzMyNTk=","name":"custom_connector_docs","full_name":"workato/custom_connector_docs","private":false,"owner":{"login":"workato","id":5629924,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2Mjk5MjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5629924?v=4","gravatar_id":"","url":"https://api.github.com/users/workato","html_url":"https://github.com/workato","followers_url":"https://api.github.com/users/workato/followers","following_url":"https://api.github.com/users/workato/following{/other_user}","gists_url":"https://api.github.com/users/workato/gists{/gist_id}","starred_url":"https://api.github.com/users/workato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workato/subscriptions","organizations_url":"https://api.github.com/users/workato/orgs","repos_url":"https://api.github.com/users/workato/repos","events_url":"https://api.github.com/users/workato/events{/privacy}","received_events_url":"https://api.github.com/users/workato/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/workato/custom_connector_docs","description":null,"fork":false,"url":"https://api.github.com/repos/workato/custom_connector_docs","forks_url":"https://api.github.com/repos/workato/custom_connector_docs/forks","keys_url":"https://api.github.com/repos/workato/custom_connector_docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/workato/custom_connector_docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/workato/custom_connector_docs/teams","hooks_url":"https://api.github.com/repos/workato/custom_connector_docs/hooks","issue_events_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/events{/number}","events_url":"https://api.github.com/repos/workato/custom_connector_docs/events","assignees_url":"https://api.github.com/repos/workato/custom_connector_docs/assignees{/user}","branches_url":"https://api.github.com/repos/workato/custom_connector_docs/branches{/branch}","tags_url":"https://api.github.com/repos/workato/custom_connector_docs/tags","blobs_url":"https://api.github.com/repos/workato/custom_connector_docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/workato/custom_connector_docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/workato/custom_connector_docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/workato/custom_connector_docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/workato/custom_connector_docs/statuses/{sha}","languages_url":"https://api.github.com/repos/workato/custom_connector_docs/languages","stargazers_url":"https://api.github.com/repos/workato/custom_connector_docs/stargazers","contributors_url":"https://api.github.com/repos/workato/custom_connector_docs/contributors","subscribers_url":"https://api.github.com/repos/workato/custom_connector_docs/subscribers","subscription_url":"https://api.github.com/repos/workato/custom_connector_docs/subscription","commits_url":"https://api.github.com/repos/workato/custom_connector_docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/workato/custom_connector_docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/workato/custom_connector_docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/workato/custom_connector_docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/workato/custom_connector_docs/contents/{+path}","compare_url":"https://api.github.com/repos/workato/custom_connector_docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/workato/custom_connector_docs/merges","archive_url":"https://api.github.com/repos/workato/custom_connector_docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/workato/custom_connector_docs/downloads","issues_url":"https://api.github.com/repos/workato/custom_connector_docs/issues{/number}","pulls_url":"https://api.github.com/repos/workato/custom_connector_docs/pulls{/number}","milestones_url":"https://api.github.com/repos/workato/custom_connector_docs/milestones{/number}","notifications_url":"https://api.github.com/repos/workato/custom_connector_docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/workato/custom_connector_docs/labels{/name}","releases_url":"https://api.github.com/repos/workato/custom_connector_docs/releases{/id}","deployments_url":"https://api.github.com/repos/workato/custom_connector_docs/deployments","created_at":"2018-07-31T21:44:08Z","updated_at":"2019-06-04T16:39:04Z","pushed_at":"2019-06-07T14:20:51Z","git_url":"git://github.com/workato/custom_connector_docs.git","ssh_url":"git@github.com:workato/custom_connector_docs.git","clone_url":"https://github.com/workato/custom_connector_docs.git","svn_url":"https://github.com/workato/custom_connector_docs","homepage":null,"size":1309,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":18,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":13,"license":null,"forks":18,"open_issues":13,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/60"},"html":{"href":"https://github.com/workato/custom_connector_docs/pull/60"},"issue":{"href":"https://api.github.com/repos/workato/custom_connector_docs/issues/60"},"comments":{"href":"https://api.github.com/repos/workato/custom_connector_docs/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/workato/custom_connector_docs/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/workato/custom_connector_docs/statuses/3190b975b33fb6b65e7375cb5addff47facd9e85"}},"author_association":"COLLABORATOR"}}
other: {"actor":{"display_login":"houndci-bot"}}