{"action":"created","comment":{"url":"https://api.github.com/repos/namely/connect/pulls/comments/34298657","id":34298657,"diff_hunk":"@@ -0,0 +1,54 @@\n+module CommonCandidateImporter\n+  def initialize(connection:, mailer:, params:)\n+    @connection = connection\n+    @mailer = mailer\n+    @params = params\n+  end\n+\n+  private\n+\n+  def import_candidate\n+    if imported_result.success?\n+      notify_of_successful_import\n+    else\n+      notify_of_unsuccessful_import\n+    end\n+  end\n+\n+  def user\n+    @user ||= connection.user\n+  end\n+\n+  def namely_importer\n+    NamelyImporter.new(\n+      attribute_mapper: attribute_mapper,\n+      namely_connection: user.namely_connection,\n+    )\n+  end\n+\n+  def notifier","path":"app/services/common_candidate_importer.rb","position":29,"original_position":29,"commit_id":"6cfd206220f68fd122904d609fb32e844dd62d24","original_commit_id":"6cfd206220f68fd122904d609fb32e844dd62d24","user":{"login":"base10","id":26247,"avatar_url":"https://avatars.githubusercontent.com/u/26247?v=3","gravatar_id":"","url":"https://api.github.com/users/base10","html_url":"https://github.com/base10","followers_url":"https://api.github.com/users/base10/followers","following_url":"https://api.github.com/users/base10/following{/other_user}","gists_url":"https://api.github.com/users/base10/gists{/gist_id}","starred_url":"https://api.github.com/users/base10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/base10/subscriptions","organizations_url":"https://api.github.com/users/base10/orgs","repos_url":"https://api.github.com/users/base10/repos","events_url":"https://api.github.com/users/base10/events{/privacy}","received_events_url":"https://api.github.com/users/base10/received_events","type":"User","site_admin":false},"body":"Potentially better as `#authentication_notifier` now","created_at":"2015-07-09T20:17:57Z","updated_at":"2015-07-09T20:17:57Z","html_url":"https://github.com/namely/connect/pull/138#discussion_r34298657","pull_request_url":"https://api.github.com/repos/namely/connect/pulls/138","_links":{"self":{"href":"https://api.github.com/repos/namely/connect/pulls/comments/34298657"},"html":{"href":"https://github.com/namely/connect/pull/138#discussion_r34298657"},"pull_request":{"href":"https://api.github.com/repos/namely/connect/pulls/138"}}},"pull_request":{"url":"https://api.github.com/repos/namely/connect/pulls/138","id":39413161,"html_url":"https://github.com/namely/connect/pull/138","diff_url":"https://github.com/namely/connect/pull/138.diff","patch_url":"https://github.com/namely/connect/pull/138.patch","issue_url":"https://api.github.com/repos/namely/connect/issues/138","number":138,"state":"open","locked":false,"title":"Refactor *::CandidateImporter classes","user":{"login":"base10","id":26247,"avatar_url":"https://avatars.githubusercontent.com/u/26247?v=3","gravatar_id":"","url":"https://api.github.com/users/base10","html_url":"https://github.com/base10","followers_url":"https://api.github.com/users/base10/followers","following_url":"https://api.github.com/users/base10/following{/other_user}","gists_url":"https://api.github.com/users/base10/gists{/gist_id}","starred_url":"https://api.github.com/users/base10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/base10/subscriptions","organizations_url":"https://api.github.com/users/base10/orgs","repos_url":"https://api.github.com/users/base10/repos","events_url":"https://api.github.com/users/base10/events{/privacy}","received_events_url":"https://api.github.com/users/base10/received_events","type":"User","site_admin":false},"body":"* Welcome CommonCandidateImporter\n* Both Icims::CandidateImporter and Greenhouse::CandidatesImporter were\n  iteratively adjusted to bring method signatures into alignment\n* Where there was a clean match between the two concrete classes,\n  methods were extracted to CommonCandidateImporter\n* The classes now expect keyword arguments for initialization with\n  matching changes made in the specs and controllers that invoke the\n  concrete classes\n  * This will mean arguments to an importer will not be positionally\n    dependent\n* In Greenhouse::, #candidate_name became #candidate\n* #candidate_name and #import_result became public methods\n  * These are used by the iCIMS' candidate import retry controller\n* Greenhouse::CandidatesImporter still has it's own `#initialize`, but\n  it `super`s to the CommonCandidateImporter one\n* Greenhouse::CandidatesImporter and\n  GreenhouseCandidatesImportsController were adjusted so that\nGreenhouse::CandidatesImporter now gets a connection passed in instead\n  of having to create one\n* New importers will need to implement the following:\n  * INTEGRATION_ID\n    * e.g. \"greenhouse\" or \"icims\"\n  * #candidate\n  * #import\n  * #imported_result\n* For: https://trello.com/c/Wr0dqCQe/\n* Depends on #135, #136, #137 being merged in","created_at":"2015-07-07T20:31:20Z","updated_at":"2015-07-09T20:17:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cb91d847656b3ee496288e7694f7cac558aa327","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/namely/connect/pulls/138/commits","review_comments_url":"https://api.github.com/repos/namely/connect/pulls/138/comments","review_comment_url":"https://api.github.com/repos/namely/connect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/namely/connect/issues/138/comments","statuses_url":"https://api.github.com/repos/namely/connect/statuses/6cfd206220f68fd122904d609fb32e844dd62d24","head":{"label":"namely:nlw-refactor-candidate-importers","ref":"nlw-refactor-candidate-importers","sha":"6cfd206220f68fd122904d609fb32e844dd62d24","user":{"login":"namely","id":1004321,"avatar_url":"https://avatars.githubusercontent.com/u/1004321?v=3","gravatar_id":"","url":"https://api.github.com/users/namely","html_url":"https://github.com/namely","followers_url":"https://api.github.com/users/namely/followers","following_url":"https://api.github.com/users/namely/following{/other_user}","gists_url":"https://api.github.com/users/namely/gists{/gist_id}","starred_url":"https://api.github.com/users/namely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namely/subscriptions","organizations_url":"https://api.github.com/users/namely/orgs","repos_url":"https://api.github.com/users/namely/repos","events_url":"https://api.github.com/users/namely/events{/privacy}","received_events_url":"https://api.github.com/users/namely/received_events","type":"Organization","site_admin":false},"repo":{"id":26101808,"name":"connect","full_name":"namely/connect","owner":{"login":"namely","id":1004321,"avatar_url":"https://avatars.githubusercontent.com/u/1004321?v=3","gravatar_id":"","url":"https://api.github.com/users/namely","html_url":"https://github.com/namely","followers_url":"https://api.github.com/users/namely/followers","following_url":"https://api.github.com/users/namely/following{/other_user}","gists_url":"https://api.github.com/users/namely/gists{/gist_id}","starred_url":"https://api.github.com/users/namely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namely/subscriptions","organizations_url":"https://api.github.com/users/namely/orgs","repos_url":"https://api.github.com/users/namely/repos","events_url":"https://api.github.com/users/namely/events{/privacy}","received_events_url":"https://api.github.com/users/namely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/namely/connect","description":"Namely Connect – Integrations with the Namely HRIS System.","fork":false,"url":"https://api.github.com/repos/namely/connect","forks_url":"https://api.github.com/repos/namely/connect/forks","keys_url":"https://api.github.com/repos/namely/connect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/namely/connect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/namely/connect/teams","hooks_url":"https://api.github.com/repos/namely/connect/hooks","issue_events_url":"https://api.github.com/repos/namely/connect/issues/events{/number}","events_url":"https://api.github.com/repos/namely/connect/events","assignees_url":"https://api.github.com/repos/namely/connect/assignees{/user}","branches_url":"https://api.github.com/repos/namely/connect/branches{/branch}","tags_url":"https://api.github.com/repos/namely/connect/tags","blobs_url":"https://api.github.com/repos/namely/connect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/namely/connect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/namely/connect/git/refs{/sha}","trees_url":"https://api.github.com/repos/namely/connect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/namely/connect/statuses/{sha}","languages_url":"https://api.github.com/repos/namely/connect/languages","stargazers_url":"https://api.github.com/repos/namely/connect/stargazers","contributors_url":"https://api.github.com/repos/namely/connect/contributors","subscribers_url":"https://api.github.com/repos/namely/connect/subscribers","subscription_url":"https://api.github.com/repos/namely/connect/subscription","commits_url":"https://api.github.com/repos/namely/connect/commits{/sha}","git_commits_url":"https://api.github.com/repos/namely/connect/git/commits{/sha}","comments_url":"https://api.github.com/repos/namely/connect/comments{/number}","issue_comment_url":"https://api.github.com/repos/namely/connect/issues/comments{/number}","contents_url":"https://api.github.com/repos/namely/connect/contents/{+path}","compare_url":"https://api.github.com/repos/namely/connect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/namely/connect/merges","archive_url":"https://api.github.com/repos/namely/connect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/namely/connect/downloads","issues_url":"https://api.github.com/repos/namely/connect/issues{/number}","pulls_url":"https://api.github.com/repos/namely/connect/pulls{/number}","milestones_url":"https://api.github.com/repos/namely/connect/milestones{/number}","notifications_url":"https://api.github.com/repos/namely/connect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/namely/connect/labels{/name}","releases_url":"https://api.github.com/repos/namely/connect/releases{/id}","created_at":"2014-11-03T03:10:16Z","updated_at":"2015-06-16T14:13:51Z","pushed_at":"2015-07-09T20:12:29Z","git_url":"git://github.com/namely/connect.git","ssh_url":"git@github.com:namely/connect.git","clone_url":"https://github.com/namely/connect.git","svn_url":"https://github.com/namely/connect","homepage":"","size":4342,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"namely:master","ref":"master","sha":"7ad9b0168fc18509a7ff3ead67ff401cb827adab","user":{"login":"namely","id":1004321,"avatar_url":"https://avatars.githubusercontent.com/u/1004321?v=3","gravatar_id":"","url":"https://api.github.com/users/namely","html_url":"https://github.com/namely","followers_url":"https://api.github.com/users/namely/followers","following_url":"https://api.github.com/users/namely/following{/other_user}","gists_url":"https://api.github.com/users/namely/gists{/gist_id}","starred_url":"https://api.github.com/users/namely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namely/subscriptions","organizations_url":"https://api.github.com/users/namely/orgs","repos_url":"https://api.github.com/users/namely/repos","events_url":"https://api.github.com/users/namely/events{/privacy}","received_events_url":"https://api.github.com/users/namely/received_events","type":"Organization","site_admin":false},"repo":{"id":26101808,"name":"connect","full_name":"namely/connect","owner":{"login":"namely","id":1004321,"avatar_url":"https://avatars.githubusercontent.com/u/1004321?v=3","gravatar_id":"","url":"https://api.github.com/users/namely","html_url":"https://github.com/namely","followers_url":"https://api.github.com/users/namely/followers","following_url":"https://api.github.com/users/namely/following{/other_user}","gists_url":"https://api.github.com/users/namely/gists{/gist_id}","starred_url":"https://api.github.com/users/namely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namely/subscriptions","organizations_url":"https://api.github.com/users/namely/orgs","repos_url":"https://api.github.com/users/namely/repos","events_url":"https://api.github.com/users/namely/events{/privacy}","received_events_url":"https://api.github.com/users/namely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/namely/connect","description":"Namely Connect – Integrations with the Namely HRIS System.","fork":false,"url":"https://api.github.com/repos/namely/connect","forks_url":"https://api.github.com/repos/namely/connect/forks","keys_url":"https://api.github.com/repos/namely/connect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/namely/connect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/namely/connect/teams","hooks_url":"https://api.github.com/repos/namely/connect/hooks","issue_events_url":"https://api.github.com/repos/namely/connect/issues/events{/number}","events_url":"https://api.github.com/repos/namely/connect/events","assignees_url":"https://api.github.com/repos/namely/connect/assignees{/user}","branches_url":"https://api.github.com/repos/namely/connect/branches{/branch}","tags_url":"https://api.github.com/repos/namely/connect/tags","blobs_url":"https://api.github.com/repos/namely/connect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/namely/connect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/namely/connect/git/refs{/sha}","trees_url":"https://api.github.com/repos/namely/connect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/namely/connect/statuses/{sha}","languages_url":"https://api.github.com/repos/namely/connect/languages","stargazers_url":"https://api.github.com/repos/namely/connect/stargazers","contributors_url":"https://api.github.com/repos/namely/connect/contributors","subscribers_url":"https://api.github.com/repos/namely/connect/subscribers","subscription_url":"https://api.github.com/repos/namely/connect/subscription","commits_url":"https://api.github.com/repos/namely/connect/commits{/sha}","git_commits_url":"https://api.github.com/repos/namely/connect/git/commits{/sha}","comments_url":"https://api.github.com/repos/namely/connect/comments{/number}","issue_comment_url":"https://api.github.com/repos/namely/connect/issues/comments{/number}","contents_url":"https://api.github.com/repos/namely/connect/contents/{+path}","compare_url":"https://api.github.com/repos/namely/connect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/namely/connect/merges","archive_url":"https://api.github.com/repos/namely/connect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/namely/connect/downloads","issues_url":"https://api.github.com/repos/namely/connect/issues{/number}","pulls_url":"https://api.github.com/repos/namely/connect/pulls{/number}","milestones_url":"https://api.github.com/repos/namely/connect/milestones{/number}","notifications_url":"https://api.github.com/repos/namely/connect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/namely/connect/labels{/name}","releases_url":"https://api.github.com/repos/namely/connect/releases{/id}","created_at":"2014-11-03T03:10:16Z","updated_at":"2015-06-16T14:13:51Z","pushed_at":"2015-07-09T20:12:29Z","git_url":"git://github.com/namely/connect.git","ssh_url":"git@github.com:namely/connect.git","clone_url":"https://github.com/namely/connect.git","svn_url":"https://github.com/namely/connect","homepage":"","size":4342,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/namely/connect/pulls/138"},"html":{"href":"https://github.com/namely/connect/pull/138"},"issue":{"href":"https://api.github.com/repos/namely/connect/issues/138"},"comments":{"href":"https://api.github.com/repos/namely/connect/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/namely/connect/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/namely/connect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/namely/connect/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/namely/connect/statuses/6cfd206220f68fd122904d609fb32e844dd62d24"}}}}