GitHub PullRequestReviewCommentEvent at 2014-11-26 04:04:26
Repository: openfoodnetwork
Actor: RohanM
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments/20915416","id":20915416,"diff_hunk":"@@ -70,6 +70,21 @@ def clone\n       redirect_to main_app.admin_order_cycles_path, :notice => \"Your order cycle #{@order_cycle.name} has been cloned.\"\n     end\n \n+    OrderCycleNotificationJob = Struct.new(:order_cycle) do\n+      def perform\n+        @suppliers = order_cycle.suppliers\n+        @suppliers.each { |supplier| ProducerMailer.order_cycle_report(supplier, order_cycle).deliver }\n+      end\n+    end\n+\n+    # Send notifications to all producers who are part of the order cycle\n+    def notifications\n+      @order_cycle = OrderCycle.find params[:id]\n+      Delayed::Job.enqueue OrderCycleNotificationJob.new(@order_cycle)\n+\n+      render 'notifications'","path":"app/controllers/admin/order_cycles_controller.rb","position":16,"original_position":16,"commit_id":"8d5a0aea9f96539db425b3f57670b287853388aa","original_commit_id":"8d5a0aea9f96539db425b3f57670b287853388aa","user":{"login":"RohanM","id":154210,"avatar_url":"https://avatars.githubusercontent.com/u/154210?v=3","gravatar_id":"","url":"https://api.github.com/users/RohanM","html_url":"https://github.com/RohanM","followers_url":"https://api.github.com/users/RohanM/followers","following_url":"https://api.github.com/users/RohanM/following{/other_user}","gists_url":"https://api.github.com/users/RohanM/gists{/gist_id}","starred_url":"https://api.github.com/users/RohanM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RohanM/subscriptions","organizations_url":"https://api.github.com/users/RohanM/orgs","repos_url":"https://api.github.com/users/RohanM/repos","events_url":"https://api.github.com/users/RohanM/events{/privacy}","received_events_url":"https://api.github.com/users/RohanM/received_events","type":"User","site_admin":false},"body":"Is this line necessary? I would have guessed that it would render the `notifications` template by default.","created_at":"2014-11-26T04:04:26Z","updated_at":"2014-11-26T04:04:26Z","html_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/302#discussion_r20915416","pull_request_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/302","_links":{"self":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments/20915416"},"html":{"href":"https://github.com/openfoodfoundation/openfoodnetwork/pull/302#discussion_r20915416"},"pull_request":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/302"}}},"pull_request":{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/302","id":24965222,"html_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/302","diff_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/302.diff","patch_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/302.patch","issue_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/302","number":302,"state":"open","locked":false,"title":"Email producers with order/delivery instructions #275","user":{"login":"pmackay","id":115115,"avatar_url":"https://avatars.githubusercontent.com/u/115115?v=3","gravatar_id":"","url":"https://api.github.com/users/pmackay","html_url":"https://github.com/pmackay","followers_url":"https://api.github.com/users/pmackay/followers","following_url":"https://api.github.com/users/pmackay/following{/other_user}","gists_url":"https://api.github.com/users/pmackay/gists{/gist_id}","starred_url":"https://api.github.com/users/pmackay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmackay/subscriptions","organizations_url":"https://api.github.com/users/pmackay/orgs","repos_url":"https://api.github.com/users/pmackay/repos","events_url":"https://api.github.com/users/pmackay/events{/privacy}","received_events_url":"https://api.github.com/users/pmackay/received_events","type":"User","site_admin":false},"body":"Would be great to get a review of this as a sanity check.","created_at":"2014-11-24T21:29:59Z","updated_at":"2014-11-26T04:04:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/302/commits","review_comments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/302/comments","review_comment_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments/{number}","comments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/302/comments","statuses_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/statuses/8d5a0aea9f96539db425b3f57670b287853388aa","head":{"label":"folklabs:producer-emails","ref":"producer-emails","sha":"8d5a0aea9f96539db425b3f57670b287853388aa","user":{"login":"folklabs","id":5169460,"avatar_url":"https://avatars.githubusercontent.com/u/5169460?v=3","gravatar_id":"","url":"https://api.github.com/users/folklabs","html_url":"https://github.com/folklabs","followers_url":"https://api.github.com/users/folklabs/followers","following_url":"https://api.github.com/users/folklabs/following{/other_user}","gists_url":"https://api.github.com/users/folklabs/gists{/gist_id}","starred_url":"https://api.github.com/users/folklabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/folklabs/subscriptions","organizations_url":"https://api.github.com/users/folklabs/orgs","repos_url":"https://api.github.com/users/folklabs/repos","events_url":"https://api.github.com/users/folklabs/events{/privacy}","received_events_url":"https://api.github.com/users/folklabs/received_events","type":"Organization","site_admin":false},"repo":{"id":16024659,"name":"openfoodnetwork","full_name":"folklabs/openfoodnetwork","owner":{"login":"folklabs","id":5169460,"avatar_url":"https://avatars.githubusercontent.com/u/5169460?v=3","gravatar_id":"","url":"https://api.github.com/users/folklabs","html_url":"https://github.com/folklabs","followers_url":"https://api.github.com/users/folklabs/followers","following_url":"https://api.github.com/users/folklabs/following{/other_user}","gists_url":"https://api.github.com/users/folklabs/gists{/gist_id}","starred_url":"https://api.github.com/users/folklabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/folklabs/subscriptions","organizations_url":"https://api.github.com/users/folklabs/orgs","repos_url":"https://api.github.com/users/folklabs/repos","events_url":"https://api.github.com/users/folklabs/events{/privacy}","received_events_url":"https://api.github.com/users/folklabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/folklabs/openfoodnetwork","description":"Connect suppliers, distributors and consumers for the sale and purchase of local produce","fork":true,"url":"https://api.github.com/repos/folklabs/openfoodnetwork","forks_url":"https://api.github.com/repos/folklabs/openfoodnetwork/forks","keys_url":"https://api.github.com/repos/folklabs/openfoodnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/folklabs/openfoodnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/folklabs/openfoodnetwork/teams","hooks_url":"https://api.github.com/repos/folklabs/openfoodnetwork/hooks","issue_events_url":"https://api.github.com/repos/folklabs/openfoodnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/folklabs/openfoodnetwork/events","assignees_url":"https://api.github.com/repos/folklabs/openfoodnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/folklabs/openfoodnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/folklabs/openfoodnetwork/tags","blobs_url":"https://api.github.com/repos/folklabs/openfoodnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/folklabs/openfoodnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/folklabs/openfoodnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/folklabs/openfoodnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/folklabs/openfoodnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/folklabs/openfoodnetwork/languages","stargazers_url":"https://api.github.com/repos/folklabs/openfoodnetwork/stargazers","contributors_url":"https://api.github.com/repos/folklabs/openfoodnetwork/contributors","subscribers_url":"https://api.github.com/repos/folklabs/openfoodnetwork/subscribers","subscription_url":"https://api.github.com/repos/folklabs/openfoodnetwork/subscription","commits_url":"https://api.github.com/repos/folklabs/openfoodnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/folklabs/openfoodnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/folklabs/openfoodnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/folklabs/openfoodnetwork/issues/comments/{number}","contents_url":"https://api.github.com/repos/folklabs/openfoodnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/folklabs/openfoodnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/folklabs/openfoodnetwork/merges","archive_url":"https://api.github.com/repos/folklabs/openfoodnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/folklabs/openfoodnetwork/downloads","issues_url":"https://api.github.com/repos/folklabs/openfoodnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/folklabs/openfoodnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/folklabs/openfoodnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/folklabs/openfoodnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/folklabs/openfoodnetwork/labels{/name}","releases_url":"https://api.github.com/repos/folklabs/openfoodnetwork/releases{/id}","created_at":"2014-01-18T12:00:47Z","updated_at":"2014-11-20T05:35:18Z","pushed_at":"2014-11-25T09:33:17Z","git_url":"git://github.com/folklabs/openfoodnetwork.git","ssh_url":"git@github.com:folklabs/openfoodnetwork.git","clone_url":"https://github.com/folklabs/openfoodnetwork.git","svn_url":"https://github.com/folklabs/openfoodnetwork","homepage":null,"size":18856,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"openfoodfoundation:master","ref":"master","sha":"2f28312f7eb778c332402500e70505b9c7f11152","user":{"login":"openfoodfoundation","id":2578987,"avatar_url":"https://avatars.githubusercontent.com/u/2578987?v=3","gravatar_id":"","url":"https://api.github.com/users/openfoodfoundation","html_url":"https://github.com/openfoodfoundation","followers_url":"https://api.github.com/users/openfoodfoundation/followers","following_url":"https://api.github.com/users/openfoodfoundation/following{/other_user}","gists_url":"https://api.github.com/users/openfoodfoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/openfoodfoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfoodfoundation/subscriptions","organizations_url":"https://api.github.com/users/openfoodfoundation/orgs","repos_url":"https://api.github.com/users/openfoodfoundation/repos","events_url":"https://api.github.com/users/openfoodfoundation/events{/privacy}","received_events_url":"https://api.github.com/users/openfoodfoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":6257856,"name":"openfoodnetwork","full_name":"openfoodfoundation/openfoodnetwork","owner":{"login":"openfoodfoundation","id":2578987,"avatar_url":"https://avatars.githubusercontent.com/u/2578987?v=3","gravatar_id":"","url":"https://api.github.com/users/openfoodfoundation","html_url":"https://github.com/openfoodfoundation","followers_url":"https://api.github.com/users/openfoodfoundation/followers","following_url":"https://api.github.com/users/openfoodfoundation/following{/other_user}","gists_url":"https://api.github.com/users/openfoodfoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/openfoodfoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfoodfoundation/subscriptions","organizations_url":"https://api.github.com/users/openfoodfoundation/orgs","repos_url":"https://api.github.com/users/openfoodfoundation/repos","events_url":"https://api.github.com/users/openfoodfoundation/events{/privacy}","received_events_url":"https://api.github.com/users/openfoodfoundation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfoodfoundation/openfoodnetwork","description":"Connect suppliers, distributors and consumers for the sale and purchase of local produce","fork":false,"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork","forks_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/forks","keys_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/teams","hooks_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/hooks","issue_events_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/events","assignees_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/tags","blobs_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/languages","stargazers_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/stargazers","contributors_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/contributors","subscribers_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/subscribers","subscription_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/subscription","commits_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/comments/{number}","contents_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/merges","archive_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/downloads","issues_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/labels{/name}","releases_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/releases{/id}","created_at":"2012-10-17T07:56:23Z","updated_at":"2014-11-26T02:16:59Z","pushed_at":"2014-11-26T02:16:58Z","git_url":"git://github.com/openfoodfoundation/openfoodnetwork.git","ssh_url":"git@github.com:openfoodfoundation/openfoodnetwork.git","clone_url":"https://github.com/openfoodfoundation/openfoodnetwork.git","svn_url":"https://github.com/openfoodfoundation/openfoodnetwork","homepage":null,"size":31716,"stargazers_count":53,"watchers_count":53,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":53,"forks":21,"open_issues":53,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/302"},"html":{"href":"https://github.com/openfoodfoundation/openfoodnetwork/pull/302"},"issue":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/302"},"comments":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/302/comments"},"review_comments":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/302/comments"},"review_comment":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/302/commits"},"statuses":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/statuses/8d5a0aea9f96539db425b3f57670b287853388aa"}}}}