{"action":"created","comment":{"url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/comments/219172586","pull_request_review_id":157268641,"id":219172586,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTE3MjU4Ng==","diff_hunk":"@@ -0,0 +1,57 @@\n+require_relative 'primitive'\n+\n+module Choregraphie\n+  class After < Primitive\n+    def initialize(&block)\n+      @block = block\n+    end\n+\n+    def register(choregraphie)\n+      @choregraphie_name = choregraphie.name\n+\n+      choregraphie.before do\n+        set_in_progress\n+      end\n+\n+      choregraphie.cleanup do\n+        if in_progress?\n+          @block.call\n+          set_not_in_progress\n+        elsif !installed? # we are after a reinstallation, we can't know if we were in a choregraphie or not, run the block just in case\n+          @block.call\n+        end\n+        set_installed","path":"libraries/primitive_after.rb","position":23,"original_position":23,"commit_id":"c58d5b2ba4325dbe5d2ca9105e5bdf40e2959004","original_commit_id":"c58d5b2ba4325dbe5d2ca9105e5bdf40e2959004","user":{"login":"komuta","id":120297,"node_id":"MDQ6VXNlcjEyMDI5Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/120297?v=4","gravatar_id":"","url":"https://api.github.com/users/komuta","html_url":"https://github.com/komuta","followers_url":"https://api.github.com/users/komuta/followers","following_url":"https://api.github.com/users/komuta/following{/other_user}","gists_url":"https://api.github.com/users/komuta/gists{/gist_id}","starred_url":"https://api.github.com/users/komuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/komuta/subscriptions","organizations_url":"https://api.github.com/users/komuta/orgs","repos_url":"https://api.github.com/users/komuta/repos","events_url":"https://api.github.com/users/komuta/events{/privacy}","received_events_url":"https://api.github.com/users/komuta/received_events","type":"User","site_admin":false},"body":"This mean we will always have an 'installed' marker on the disk as long as a choregraphie is defined for the current node (even if it never actually entered it). Is this an acceptable side-effect?","created_at":"2018-09-20T13:54:35Z","updated_at":"2018-09-20T13:55:44Z","html_url":"https://github.com/criteo-cookbooks/choregraphie/pull/41#discussion_r219172586","pull_request_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/41","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/comments/219172586"},"html":{"href":"https://github.com/criteo-cookbooks/choregraphie/pull/41#discussion_r219172586"},"pull_request":{"href":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/41","id":212371516,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMzcxNTE2","html_url":"https://github.com/criteo-cookbooks/choregraphie/pull/41","diff_url":"https://github.com/criteo-cookbooks/choregraphie/pull/41.diff","patch_url":"https://github.com/criteo-cookbooks/choregraphie/pull/41.patch","issue_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/issues/41","number":41,"state":"open","locked":false,"title":"Add experimental `after` primitive","user":{"login":"kamaradclimber","id":503537,"node_id":"MDQ6VXNlcjUwMzUzNw==","avatar_url":"https://avatars1.githubusercontent.com/u/503537?v=4","gravatar_id":"","url":"https://api.github.com/users/kamaradclimber","html_url":"https://github.com/kamaradclimber","followers_url":"https://api.github.com/users/kamaradclimber/followers","following_url":"https://api.github.com/users/kamaradclimber/following{/other_user}","gists_url":"https://api.github.com/users/kamaradclimber/gists{/gist_id}","starred_url":"https://api.github.com/users/kamaradclimber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamaradclimber/subscriptions","organizations_url":"https://api.github.com/users/kamaradclimber/orgs","repos_url":"https://api.github.com/users/kamaradclimber/repos","events_url":"https://api.github.com/users/kamaradclimber/events{/privacy}","received_events_url":"https://api.github.com/users/kamaradclimber/received_events","type":"User","site_admin":false},"body":"This primitive aims to improve the cleanup primitive by not running at\r\nevery chef-client convergence.\r\n\r\nChange-Id: I6b97caaecc0c6ca5878e43623086e7b20d38cd89","created_at":"2018-08-31T12:43:54Z","updated_at":"2018-09-20T13:55:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e42e7db9831a52ca056fedf45114177b2f228edd","assignee":null,"assignees":[],"requested_reviewers":[{"login":"clems4ever","id":3193257,"node_id":"MDQ6VXNlcjMxOTMyNTc=","avatar_url":"https://avatars2.githubusercontent.com/u/3193257?v=4","gravatar_id":"","url":"https://api.github.com/users/clems4ever","html_url":"https://github.com/clems4ever","followers_url":"https://api.github.com/users/clems4ever/followers","following_url":"https://api.github.com/users/clems4ever/following{/other_user}","gists_url":"https://api.github.com/users/clems4ever/gists{/gist_id}","starred_url":"https://api.github.com/users/clems4ever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clems4ever/subscriptions","organizations_url":"https://api.github.com/users/clems4ever/orgs","repos_url":"https://api.github.com/users/clems4ever/repos","events_url":"https://api.github.com/users/clems4ever/events{/privacy}","received_events_url":"https://api.github.com/users/clems4ever/received_events","type":"User","site_admin":false},{"login":"pierrecdn","id":4225738,"node_id":"MDQ6VXNlcjQyMjU3Mzg=","avatar_url":"https://avatars3.githubusercontent.com/u/4225738?v=4","gravatar_id":"","url":"https://api.github.com/users/pierrecdn","html_url":"https://github.com/pierrecdn","followers_url":"https://api.github.com/users/pierrecdn/followers","following_url":"https://api.github.com/users/pierrecdn/following{/other_user}","gists_url":"https://api.github.com/users/pierrecdn/gists{/gist_id}","starred_url":"https://api.github.com/users/pierrecdn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierrecdn/subscriptions","organizations_url":"https://api.github.com/users/pierrecdn/orgs","repos_url":"https://api.github.com/users/pierrecdn/repos","events_url":"https://api.github.com/users/pierrecdn/events{/privacy}","received_events_url":"https://api.github.com/users/pierrecdn/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/41/commits","review_comments_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/41/comments","review_comment_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/issues/41/comments","statuses_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/statuses/c58d5b2ba4325dbe5d2ca9105e5bdf40e2959004","head":{"label":"criteo-cookbooks:after","ref":"after","sha":"c58d5b2ba4325dbe5d2ca9105e5bdf40e2959004","user":{"login":"criteo-cookbooks","id":4266429,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNjY0Mjk=","avatar_url":"https://avatars0.githubusercontent.com/u/4266429?v=4","gravatar_id":"","url":"https://api.github.com/users/criteo-cookbooks","html_url":"https://github.com/criteo-cookbooks","followers_url":"https://api.github.com/users/criteo-cookbooks/followers","following_url":"https://api.github.com/users/criteo-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/criteo-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/criteo-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/criteo-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/criteo-cookbooks/orgs","repos_url":"https://api.github.com/users/criteo-cookbooks/repos","events_url":"https://api.github.com/users/criteo-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/criteo-cookbooks/received_events","type":"Organization","site_admin":false},"repo":{"id":57308462,"node_id":"MDEwOlJlcG9zaXRvcnk1NzMwODQ2Mg==","name":"choregraphie","full_name":"criteo-cookbooks/choregraphie","private":false,"owner":{"login":"criteo-cookbooks","id":4266429,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNjY0Mjk=","avatar_url":"https://avatars0.githubusercontent.com/u/4266429?v=4","gravatar_id":"","url":"https://api.github.com/users/criteo-cookbooks","html_url":"https://github.com/criteo-cookbooks","followers_url":"https://api.github.com/users/criteo-cookbooks/followers","following_url":"https://api.github.com/users/criteo-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/criteo-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/criteo-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/criteo-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/criteo-cookbooks/orgs","repos_url":"https://api.github.com/users/criteo-cookbooks/repos","events_url":"https://api.github.com/users/criteo-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/criteo-cookbooks/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/criteo-cookbooks/choregraphie","description":"Choregraphie offers primitive to coordinate convergence of chef resources.","fork":false,"url":"https://api.github.com/repos/criteo-cookbooks/choregraphie","forks_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/forks","keys_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/teams","hooks_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/hooks","issue_events_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/issues/events{/number}","events_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/events","assignees_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/assignees{/user}","branches_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/branches{/branch}","tags_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/tags","blobs_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/git/refs{/sha}","trees_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/statuses/{sha}","languages_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/languages","stargazers_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/stargazers","contributors_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/contributors","subscribers_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/subscribers","subscription_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/subscription","commits_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/commits{/sha}","git_commits_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/git/commits{/sha}","comments_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/comments{/number}","issue_comment_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/issues/comments{/number}","contents_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/contents/{+path}","compare_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/merges","archive_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/downloads","issues_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/issues{/number}","pulls_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls{/number}","milestones_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/milestones{/number}","notifications_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/labels{/name}","releases_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/releases{/id}","deployments_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/deployments","created_at":"2016-04-28T14:32:18Z","updated_at":"2018-06-26T09:16:14Z","pushed_at":"2018-08-31T14:31:14Z","git_url":"git://github.com/criteo-cookbooks/choregraphie.git","ssh_url":"git@github.com:criteo-cookbooks/choregraphie.git","clone_url":"https://github.com/criteo-cookbooks/choregraphie.git","svn_url":"https://github.com/criteo-cookbooks/choregraphie","homepage":null,"size":135,"stargazers_count":16,"watchers_count":16,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":6,"open_issues":1,"watchers":16,"default_branch":"master"}},"base":{"label":"criteo-cookbooks:master","ref":"master","sha":"f1586e487bc5bd076c7bf173d6c771260f239513","user":{"login":"criteo-cookbooks","id":4266429,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNjY0Mjk=","avatar_url":"https://avatars0.githubusercontent.com/u/4266429?v=4","gravatar_id":"","url":"https://api.github.com/users/criteo-cookbooks","html_url":"https://github.com/criteo-cookbooks","followers_url":"https://api.github.com/users/criteo-cookbooks/followers","following_url":"https://api.github.com/users/criteo-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/criteo-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/criteo-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/criteo-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/criteo-cookbooks/orgs","repos_url":"https://api.github.com/users/criteo-cookbooks/repos","events_url":"https://api.github.com/users/criteo-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/criteo-cookbooks/received_events","type":"Organization","site_admin":false},"repo":{"id":57308462,"node_id":"MDEwOlJlcG9zaXRvcnk1NzMwODQ2Mg==","name":"choregraphie","full_name":"criteo-cookbooks/choregraphie","private":false,"owner":{"login":"criteo-cookbooks","id":4266429,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNjY0Mjk=","avatar_url":"https://avatars0.githubusercontent.com/u/4266429?v=4","gravatar_id":"","url":"https://api.github.com/users/criteo-cookbooks","html_url":"https://github.com/criteo-cookbooks","followers_url":"https://api.github.com/users/criteo-cookbooks/followers","following_url":"https://api.github.com/users/criteo-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/criteo-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/criteo-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/criteo-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/criteo-cookbooks/orgs","repos_url":"https://api.github.com/users/criteo-cookbooks/repos","events_url":"https://api.github.com/users/criteo-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/criteo-cookbooks/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/criteo-cookbooks/choregraphie","description":"Choregraphie offers primitive to coordinate convergence of chef resources.","fork":false,"url":"https://api.github.com/repos/criteo-cookbooks/choregraphie","forks_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/forks","keys_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/teams","hooks_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/hooks","issue_events_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/issues/events{/number}","events_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/events","assignees_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/assignees{/user}","branches_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/branches{/branch}","tags_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/tags","blobs_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/git/refs{/sha}","trees_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/statuses/{sha}","languages_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/languages","stargazers_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/stargazers","contributors_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/contributors","subscribers_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/subscribers","subscription_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/subscription","commits_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/commits{/sha}","git_commits_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/git/commits{/sha}","comments_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/comments{/number}","issue_comment_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/issues/comments{/number}","contents_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/contents/{+path}","compare_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/merges","archive_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/downloads","issues_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/issues{/number}","pulls_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls{/number}","milestones_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/milestones{/number}","notifications_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/labels{/name}","releases_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/releases{/id}","deployments_url":"https://api.github.com/repos/criteo-cookbooks/choregraphie/deployments","created_at":"2016-04-28T14:32:18Z","updated_at":"2018-06-26T09:16:14Z","pushed_at":"2018-08-31T14:31:14Z","git_url":"git://github.com/criteo-cookbooks/choregraphie.git","ssh_url":"git@github.com:criteo-cookbooks/choregraphie.git","clone_url":"https://github.com/criteo-cookbooks/choregraphie.git","svn_url":"https://github.com/criteo-cookbooks/choregraphie","homepage":null,"size":135,"stargazers_count":16,"watchers_count":16,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":6,"open_issues":1,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/41"},"html":{"href":"https://github.com/criteo-cookbooks/choregraphie/pull/41"},"issue":{"href":"https://api.github.com/repos/criteo-cookbooks/choregraphie/issues/41"},"comments":{"href":"https://api.github.com/repos/criteo-cookbooks/choregraphie/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/criteo-cookbooks/choregraphie/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/criteo-cookbooks/choregraphie/statuses/c58d5b2ba4325dbe5d2ca9105e5bdf40e2959004"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"komuta"}}