payload: {"action":"closed","number":1508,"pull_request":{"url":"https://api.github.com/repos/cozy/cozy-banks/pulls/1508","id":311278039,"node_id":"MDExOlB1bGxSZXF1ZXN0MzExMjc4MDM5","html_url":"https://github.com/cozy/cozy-banks/pull/1508","diff_url":"https://github.com/cozy/cozy-banks/pull/1508.diff","patch_url":"https://github.com/cozy/cozy-banks/pull/1508.patch","issue_url":"https://api.github.com/repos/cozy/cozy-banks/issues/1508","number":1508,"state":"closed","locked":false,"title":"feat(onOperationOrBillCreate): Find bills for all updated transactions","user":{"login":"drazik","id":1606068,"node_id":"MDQ6VXNlcjE2MDYwNjg=","avatar_url":"https://avatars3.githubusercontent.com/u/1606068?v=4","gravatar_id":"","url":"https://api.github.com/users/drazik","html_url":"https://github.com/drazik","followers_url":"https://api.github.com/users/drazik/followers","following_url":"https://api.github.com/users/drazik/following{/other_user}","gists_url":"https://api.github.com/users/drazik/gists{/gist_id}","starred_url":"https://api.github.com/users/drazik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drazik/subscriptions","organizations_url":"https://api.github.com/users/drazik/orgs","repos_url":"https://api.github.com/users/drazik/repos","events_url":"https://api.github.com/users/drazik/events{/privacy}","received_events_url":"https://api.github.com/users/drazik/received_events","type":"User","site_admin":false},"body":"When a user manually categorizes a transaction, we want to apply the\r\nmatching algorithm to it. For example, if a transaction is recategorized\r\nto health expense category, maybe we can find a related bill that didn't\r\nmatch previously because the category was not good.\r\n\r\nI see a possible problem with that though: the service will be run twice when a transaction matched with a bill, because the matching updates the transaction. I don't know how I can do better than that actually. The only solution I have in mind is to compare the document and its previous revision to see precisely what changed and skip some parts of the service if needed. But the service will still be run twice.\r\n\r\nI think it shows that we need to split the `onOperationOrBillCreate` service into multiple ones. Any thoughts?","created_at":"2019-08-27T09:02:56Z","updated_at":"2019-09-20T15:00:38Z","closed_at":"2019-09-20T15:00:38Z","merged_at":"2019-09-20T15:00:38Z","merge_commit_sha":"8931485dfbc6552c3521386a829d0a159e9ab093","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cozy/cozy-banks/pulls/1508/commits","review_comments_url":"https://api.github.com/repos/cozy/cozy-banks/pulls/1508/comments","review_comment_url":"https://api.github.com/repos/cozy/cozy-banks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cozy/cozy-banks/issues/1508/comments","statuses_url":"https://api.github.com/repos/cozy/cozy-banks/statuses/78fd8673f7fef662d5da9db6f29119d7d9a151c0","head":{"label":"cozy:recategorization-run-matching","ref":"recategorization-run-matching","sha":"78fd8673f7fef662d5da9db6f29119d7d9a151c0","user":{"login":"cozy","id":7690525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2OTA1MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7690525?v=4","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"repo":{"id":127015178,"node_id":"MDEwOlJlcG9zaXRvcnkxMjcwMTUxNzg=","name":"cozy-banks","full_name":"cozy/cozy-banks","private":false,"owner":{"login":"cozy","id":7690525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2OTA1MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7690525?v=4","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cozy/cozy-banks","description":"A Banks Aggregator on Cozy","fork":false,"url":"https://api.github.com/repos/cozy/cozy-banks","forks_url":"https://api.github.com/repos/cozy/cozy-banks/forks","keys_url":"https://api.github.com/repos/cozy/cozy-banks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cozy/cozy-banks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cozy/cozy-banks/teams","hooks_url":"https://api.github.com/repos/cozy/cozy-banks/hooks","issue_events_url":"https://api.github.com/repos/cozy/cozy-banks/issues/events{/number}","events_url":"https://api.github.com/repos/cozy/cozy-banks/events","assignees_url":"https://api.github.com/repos/cozy/cozy-banks/assignees{/user}","branches_url":"https://api.github.com/repos/cozy/cozy-banks/branches{/branch}","tags_url":"https://api.github.com/repos/cozy/cozy-banks/tags","blobs_url":"https://api.github.com/repos/cozy/cozy-banks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cozy/cozy-banks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cozy/cozy-banks/git/refs{/sha}","trees_url":"https://api.github.com/repos/cozy/cozy-banks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cozy/cozy-banks/statuses/{sha}","languages_url":"https://api.github.com/repos/cozy/cozy-banks/languages","stargazers_url":"https://api.github.com/repos/cozy/cozy-banks/stargazers","contributors_url":"https://api.github.com/repos/cozy/cozy-banks/contributors","subscribers_url":"https://api.github.com/repos/cozy/cozy-banks/subscribers","subscription_url":"https://api.github.com/repos/cozy/cozy-banks/subscription","commits_url":"https://api.github.com/repos/cozy/cozy-banks/commits{/sha}","git_commits_url":"https://api.github.com/repos/cozy/cozy-banks/git/commits{/sha}","comments_url":"https://api.github.com/repos/cozy/cozy-banks/comments{/number}","issue_comment_url":"https://api.github.com/repos/cozy/cozy-banks/issues/comments{/number}","contents_url":"https://api.github.com/repos/cozy/cozy-banks/contents/{+path}","compare_url":"https://api.github.com/repos/cozy/cozy-banks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cozy/cozy-banks/merges","archive_url":"https://api.github.com/repos/cozy/cozy-banks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cozy/cozy-banks/downloads","issues_url":"https://api.github.com/repos/cozy/cozy-banks/issues{/number}","pulls_url":"https://api.github.com/repos/cozy/cozy-banks/pulls{/number}","milestones_url":"https://api.github.com/repos/cozy/cozy-banks/milestones{/number}","notifications_url":"https://api.github.com/repos/cozy/cozy-banks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cozy/cozy-banks/labels{/name}","releases_url":"https://api.github.com/repos/cozy/cozy-banks/releases{/id}","deployments_url":"https://api.github.com/repos/cozy/cozy-banks/deployments","created_at":"2018-03-27T16:24:37Z","updated_at":"2019-09-20T09:01:30Z","pushed_at":"2019-09-20T15:00:38Z","git_url":"git://github.com/cozy/cozy-banks.git","ssh_url":"git@github.com:cozy/cozy-banks.git","clone_url":"https://github.com/cozy/cozy-banks.git","svn_url":"https://github.com/cozy/cozy-banks","homepage":"https://cozy.io","size":96372,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":47,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":13,"open_issues":47,"watchers":22,"default_branch":"master"}},"base":{"label":"cozy:master","ref":"master","sha":"08df64a2b8e7c83fc31d780506e9fbad5a9927b2","user":{"login":"cozy","id":7690525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2OTA1MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7690525?v=4","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"repo":{"id":127015178,"node_id":"MDEwOlJlcG9zaXRvcnkxMjcwMTUxNzg=","name":"cozy-banks","full_name":"cozy/cozy-banks","private":false,"owner":{"login":"cozy","id":7690525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2OTA1MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7690525?v=4","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cozy/cozy-banks","description":"A Banks Aggregator on Cozy","fork":false,"url":"https://api.github.com/repos/cozy/cozy-banks","forks_url":"https://api.github.com/repos/cozy/cozy-banks/forks","keys_url":"https://api.github.com/repos/cozy/cozy-banks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cozy/cozy-banks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cozy/cozy-banks/teams","hooks_url":"https://api.github.com/repos/cozy/cozy-banks/hooks","issue_events_url":"https://api.github.com/repos/cozy/cozy-banks/issues/events{/number}","events_url":"https://api.github.com/repos/cozy/cozy-banks/events","assignees_url":"https://api.github.com/repos/cozy/cozy-banks/assignees{/user}","branches_url":"https://api.github.com/repos/cozy/cozy-banks/branches{/branch}","tags_url":"https://api.github.com/repos/cozy/cozy-banks/tags","blobs_url":"https://api.github.com/repos/cozy/cozy-banks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cozy/cozy-banks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cozy/cozy-banks/git/refs{/sha}","trees_url":"https://api.github.com/repos/cozy/cozy-banks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cozy/cozy-banks/statuses/{sha}","languages_url":"https://api.github.com/repos/cozy/cozy-banks/languages","stargazers_url":"https://api.github.com/repos/cozy/cozy-banks/stargazers","contributors_url":"https://api.github.com/repos/cozy/cozy-banks/contributors","subscribers_url":"https://api.github.com/repos/cozy/cozy-banks/subscribers","subscription_url":"https://api.github.com/repos/cozy/cozy-banks/subscription","commits_url":"https://api.github.com/repos/cozy/cozy-banks/commits{/sha}","git_commits_url":"https://api.github.com/repos/cozy/cozy-banks/git/commits{/sha}","comments_url":"https://api.github.com/repos/cozy/cozy-banks/comments{/number}","issue_comment_url":"https://api.github.com/repos/cozy/cozy-banks/issues/comments{/number}","contents_url":"https://api.github.com/repos/cozy/cozy-banks/contents/{+path}","compare_url":"https://api.github.com/repos/cozy/cozy-banks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cozy/cozy-banks/merges","archive_url":"https://api.github.com/repos/cozy/cozy-banks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cozy/cozy-banks/downloads","issues_url":"https://api.github.com/repos/cozy/cozy-banks/issues{/number}","pulls_url":"https://api.github.com/repos/cozy/cozy-banks/pulls{/number}","milestones_url":"https://api.github.com/repos/cozy/cozy-banks/milestones{/number}","notifications_url":"https://api.github.com/repos/cozy/cozy-banks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cozy/cozy-banks/labels{/name}","releases_url":"https://api.github.com/repos/cozy/cozy-banks/releases{/id}","deployments_url":"https://api.github.com/repos/cozy/cozy-banks/deployments","created_at":"2018-03-27T16:24:37Z","updated_at":"2019-09-20T09:01:30Z","pushed_at":"2019-09-20T15:00:38Z","git_url":"git://github.com/cozy/cozy-banks.git","ssh_url":"git@github.com:cozy/cozy-banks.git","clone_url":"https://github.com/cozy/cozy-banks.git","svn_url":"https://github.com/cozy/cozy-banks","homepage":"https://cozy.io","size":96372,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":47,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":13,"open_issues":47,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-banks/pulls/1508"},"html":{"href":"https://github.com/cozy/cozy-banks/pull/1508"},"issue":{"href":"https://api.github.com/repos/cozy/cozy-banks/issues/1508"},"comments":{"href":"https://api.github.com/repos/cozy/cozy-banks/issues/1508/comments"},"review_comments":{"href":"https://api.github.com/repos/cozy/cozy-banks/pulls/1508/comments"},"review_comment":{"href":"https://api.github.com/repos/cozy/cozy-banks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cozy/cozy-banks/pulls/1508/commits"},"statuses":{"href":"https://api.github.com/repos/cozy/cozy-banks/statuses/78fd8673f7fef662d5da9db6f29119d7d9a151c0"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"drazik","id":1606068,"node_id":"MDQ6VXNlcjE2MDYwNjg=","avatar_url":"https://avatars3.githubusercontent.com/u/1606068?v=4","gravatar_id":"","url":"https://api.github.com/users/drazik","html_url":"https://github.com/drazik","followers_url":"https://api.github.com/users/drazik/followers","following_url":"https://api.github.com/users/drazik/following{/other_user}","gists_url":"https://api.github.com/users/drazik/gists{/gist_id}","starred_url":"https://api.github.com/users/drazik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drazik/subscriptions","organizations_url":"https://api.github.com/users/drazik/orgs","repos_url":"https://api.github.com/users/drazik/repos","events_url":"https://api.github.com/users/drazik/events{/privacy}","received_events_url":"https://api.github.com/users/drazik/received_events","type":"User","site_admin":false},"comments":6,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":2,"deletions":5,"changed_files":2}}
other: {"actor":{"display_login":"drazik"}}