{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/comments/28233189","id":28233189,"diff_hunk":"@@ -420,7 +420,7 @@ def _rev_to_sha(self, formula, repo):\n             have_updated = True\n \n \n-def get_formulas(root_formula=None, root_dir='.', constraint=None):\n+def get_formulas(root_formula=None, root_dir='.', constraint=None, formula_exclusions=[]):","path":"shaker/salt_shaker.py","position":5,"original_position":5,"commit_id":"b0c729a312080c1aa5a05111d361e98d0f5dfdcb","original_commit_id":"b0c729a312080c1aa5a05111d361e98d0f5dfdcb","user":{"login":"ashb","id":34150,"avatar_url":"https://avatars.githubusercontent.com/u/34150?v=3","gravatar_id":"","url":"https://api.github.com/users/ashb","html_url":"https://github.com/ashb","followers_url":"https://api.github.com/users/ashb/followers","following_url":"https://api.github.com/users/ashb/following{/other_user}","gists_url":"https://api.github.com/users/ashb/gists{/gist_id}","starred_url":"https://api.github.com/users/ashb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashb/subscriptions","organizations_url":"https://api.github.com/users/ashb/orgs","repos_url":"https://api.github.com/users/ashb/repos","events_url":"https://api.github.com/users/ashb/events{/privacy}","received_events_url":"https://api.github.com/users/ashb/received_events","type":"User","site_admin":false},"body":"Python default arguments should never be objects because if you call `get_formulas` twice in the same interpreter, the second time around you will reuse *the same array as last time* - you won't get a new array again.\r\n\r\nThe way to deal with this is something like this:\r\n\r\n```python\r\n    if formula_exclusions is None:\r\n        formula_exclusions = []\r\n```","created_at":"2015-04-13T12:19:54Z","updated_at":"2015-04-13T12:19:54Z","html_url":"https://github.com/ministryofjustice/salt-shaker/pull/23#discussion_r28233189","pull_request_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/comments/28233189"},"html":{"href":"https://github.com/ministryofjustice/salt-shaker/pull/23#discussion_r28233189"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/23","id":33056741,"html_url":"https://github.com/ministryofjustice/salt-shaker/pull/23","diff_url":"https://github.com/ministryofjustice/salt-shaker/pull/23.diff","patch_url":"https://github.com/ministryofjustice/salt-shaker/pull/23.patch","issue_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/issues/23","number":23,"state":"open","locked":false,"title":"Fixes #4 Deal with current formula being a dependency of another formula","user":{"login":"niallcreech","id":2128678,"avatar_url":"https://avatars.githubusercontent.com/u/2128678?v=3","gravatar_id":"","url":"https://api.github.com/users/niallcreech","html_url":"https://github.com/niallcreech","followers_url":"https://api.github.com/users/niallcreech/followers","following_url":"https://api.github.com/users/niallcreech/following{/other_user}","gists_url":"https://api.github.com/users/niallcreech/gists{/gist_id}","starred_url":"https://api.github.com/users/niallcreech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niallcreech/subscriptions","organizations_url":"https://api.github.com/users/niallcreech/orgs","repos_url":"https://api.github.com/users/niallcreech/repos","events_url":"https://api.github.com/users/niallcreech/events{/privacy}","received_events_url":"https://api.github.com/users/niallcreech/received_events","type":"User","site_admin":false},"body":"Pass a template exclusion list to dependency getting functions\r\nto allow being able to pass template names to ignore into them\r\nand also recursively ignoring dependencies. This allows cyclic\r\nroot dependencies to be watched for as we move deeper into\r\ndependency trees\r\n\r\n    * Add in test case to break on cyclical root dependency,\r\n        this will check in depth for the occurance of the\r\n        derived root formula name\r\n    * resolve_deps:get_reqs and get_reqs_recursive now accept\r\n        a dictionary parameter of excluded formulas. These will\r\n        not be added if the formula name is found in a sub\r\n        dependency\r\n    * Have salt-shaker:get_dep return deps reference\r\n    * Move metadata opening into a helper function","created_at":"2015-04-10T15:26:03Z","updated_at":"2015-04-13T12:19:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc562b07adebf9740c5a04ec05142dd4ecd7460c","assignee":{"login":"ashb","id":34150,"avatar_url":"https://avatars.githubusercontent.com/u/34150?v=3","gravatar_id":"","url":"https://api.github.com/users/ashb","html_url":"https://github.com/ashb","followers_url":"https://api.github.com/users/ashb/followers","following_url":"https://api.github.com/users/ashb/following{/other_user}","gists_url":"https://api.github.com/users/ashb/gists{/gist_id}","starred_url":"https://api.github.com/users/ashb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashb/subscriptions","organizations_url":"https://api.github.com/users/ashb/orgs","repos_url":"https://api.github.com/users/ashb/repos","events_url":"https://api.github.com/users/ashb/events{/privacy}","received_events_url":"https://api.github.com/users/ashb/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/23/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/23/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/issues/23/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/statuses/b0c729a312080c1aa5a05111d361e98d0f5dfdcb","head":{"label":"ministryofjustice:ignore-root-formula-dependency","ref":"ignore-root-formula-dependency","sha":"b0c729a312080c1aa5a05111d361e98d0f5dfdcb","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":22644756,"name":"salt-shaker","full_name":"ministryofjustice/salt-shaker","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/salt-shaker","description":"Opinionated saltstack formula dependency resolver","fork":false,"url":"https://api.github.com/repos/ministryofjustice/salt-shaker","forks_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/forks","keys_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/events","assignees_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/merges","archive_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/releases{/id}","created_at":"2014-08-05T13:36:31Z","updated_at":"2015-04-08T15:57:49Z","pushed_at":"2015-04-13T09:18:21Z","git_url":"git://github.com/ministryofjustice/salt-shaker.git","ssh_url":"git@github.com:ministryofjustice/salt-shaker.git","clone_url":"https://github.com/ministryofjustice/salt-shaker.git","svn_url":"https://github.com/ministryofjustice/salt-shaker","homepage":"","size":586,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":5,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"057a5c1568c098662ad30fa4c1aa4d4890ec0fde","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":22644756,"name":"salt-shaker","full_name":"ministryofjustice/salt-shaker","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/salt-shaker","description":"Opinionated saltstack formula dependency resolver","fork":false,"url":"https://api.github.com/repos/ministryofjustice/salt-shaker","forks_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/forks","keys_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/events","assignees_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/merges","archive_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/salt-shaker/releases{/id}","created_at":"2014-08-05T13:36:31Z","updated_at":"2015-04-08T15:57:49Z","pushed_at":"2015-04-13T09:18:21Z","git_url":"git://github.com/ministryofjustice/salt-shaker.git","ssh_url":"git@github.com:ministryofjustice/salt-shaker.git","clone_url":"https://github.com/ministryofjustice/salt-shaker.git","svn_url":"https://github.com/ministryofjustice/salt-shaker","homepage":"","size":586,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/23"},"html":{"href":"https://github.com/ministryofjustice/salt-shaker/pull/23"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/salt-shaker/issues/23"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/salt-shaker/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/salt-shaker/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/salt-shaker/statuses/b0c729a312080c1aa5a05111d361e98d0f5dfdcb"}}}}