{"action":"created","comment":{"url":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/comments/56956296","id":56956296,"diff_hunk":"@@ -18,45 +18,165 @@\n import time\n import yaml\n import sys\n+import getpass\n \n from tattle.model import QueryConfig\n from tattle.model import Query\n from tattle.model import Filter\n \n-\n GITHUB_USER = 'GITHUB_USER'\n GITHUB_PASS = 'GITHUB_PASS'\n CONFIG_PATH_COMMAND_NAME = '--config-path'\n CONFIG_PATH_HELP_TEXT = 'a path to a YAML configuration file'\n-\n+ORG_NAME_COMMAND_NAME = '--org'\n+ORG_NAME_HELP_TEXT = 'the organization to be searched upon'\n+FILTERS_COMMAND_NAME = '--filters'\n+FILTERS_HELP_TEXT = 'filters to be used. The input should be enclosed by ' \\\n+                    '[ ] brackets. All filters will be separated by a comma.' \\\n+                    ' Each filters are enclosed in brackets. For example: ' \\\n+                    'tattle --filters ' \\\n+                    '\\\"[{\\'name\\': [\\'CFY\\']}]\\\"'\n+BRANCH_NAME_COMMAND_NAME = '--branch-names'\n+NAME_HELP_TEXT = 'the names to be searched in an intersection'\n+JIRA_TEAM_COMMAND_NAME = '--jira-team'\n+JIRA_TEAM_HELP_TEXT = 'the jira team to be searched'\n+JIRA_STATUSES_COMMAND_NAME = '--jira-statuses'\n+JIRA_STATUSES_HELP_TEXT = 'a list of all the JIRA status names that won\\'t' \\\n+                          ' be filtered by that issue filter, separated ' \\\n+                          'with space. If we refer to the above example, ' \\\n+                          '\"--jira-statuses Closed Resolved\"' \\\n+                          ' will filter all branches whose corresponding ' \\\n+                          'JIRA issue is not ' \\\n+                          '\\'Closed\\' or \\'Resolved\\''\n GITHUB_ENV_VARS_DONT_EXIST = 'GitHub authentication environment variables' \\\n                              ' do not exist.\\nPlease define them: ' \\\n                              '[GITHUB_USER], [GITHUB_PASS], and try again.'\n+OUTPUT_PATH_COMMAND_NAME = '--output-path'\n+OUTPUT_PATH_HELP_TEXT = 'the path of tattle\\'s product, the report.json file' \\\n+                        ' if an output path is not specified, the report ' \\\n+                        'file will be written in the system\\'s tmp ' \\\n+                        'directory, under tattle/report.json.'\n+THREAD_LIMIT_COMMAND_NAME = '--thread-limit'\n+THREAD_LIMIT_HELP_TEXT = 'sets the maximum number of threads used by tattle.' \\\n+                         'unless this field is explicitly specified, tattle ' \\\n+                         'will use all available resources in order the ' \\\n+                         'perform as fast as it can. Before limiting the ' \\\n+                         'number of threads that tattle uses, keep in mind ' \\\n+                         'that interacting with external APIs over the web ' \\\n+                         'can take some time, especially when dealing with ' \\\n+                         'large GitHub project.'\n \n ARGUMENT_PARSER_DESCRIPTION = 'Perform simple queries on your GitHub branches'\n+USE_PASSWORD_PROMPT = 'RECOMMENDED: Enter username & password (y). Running ' \\","path":"tattle/engine.py","position":55,"original_position":55,"commit_id":"f870976e5f7fbd55ef72c704b03e5a01e965f89d","original_commit_id":"f870976e5f7fbd55ef72c704b03e5a01e965f89d","user":{"login":"davidginzbourg","id":3932179,"avatar_url":"https://avatars.githubusercontent.com/u/3932179?v=3","gravatar_id":"","url":"https://api.github.com/users/davidginzbourg","html_url":"https://github.com/davidginzbourg","followers_url":"https://api.github.com/users/davidginzbourg/followers","following_url":"https://api.github.com/users/davidginzbourg/following{/other_user}","gists_url":"https://api.github.com/users/davidginzbourg/gists{/gist_id}","starred_url":"https://api.github.com/users/davidginzbourg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidginzbourg/subscriptions","organizations_url":"https://api.github.com/users/davidginzbourg/orgs","repos_url":"https://api.github.com/users/davidginzbourg/repos","events_url":"https://api.github.com/users/davidginzbourg/events{/privacy}","received_events_url":"https://api.github.com/users/davidginzbourg/received_events","type":"User","site_admin":false},"body":".... (recommended: y) ....","created_at":"2016-03-22T09:24:32Z","updated_at":"2016-03-22T09:24:32Z","html_url":"https://github.com/cloudify-cosmo/tattle/pull/2#discussion_r56956296","pull_request_url":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/comments/56956296"},"html":{"href":"https://github.com/cloudify-cosmo/tattle/pull/2#discussion_r56956296"},"pull_request":{"href":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/2","id":62667093,"html_url":"https://github.com/cloudify-cosmo/tattle/pull/2","diff_url":"https://github.com/cloudify-cosmo/tattle/pull/2.diff","patch_url":"https://github.com/cloudify-cosmo/tattle/pull/2.patch","issue_url":"https://api.github.com/repos/cloudify-cosmo/tattle/issues/2","number":2,"state":"open","locked":false,"title":"Add the following CLI arguments:","user":{"login":"davidginzbourg","id":3932179,"avatar_url":"https://avatars.githubusercontent.com/u/3932179?v=3","gravatar_id":"","url":"https://api.github.com/users/davidginzbourg","html_url":"https://github.com/davidginzbourg","followers_url":"https://api.github.com/users/davidginzbourg/followers","following_url":"https://api.github.com/users/davidginzbourg/following{/other_user}","gists_url":"https://api.github.com/users/davidginzbourg/gists{/gist_id}","starred_url":"https://api.github.com/users/davidginzbourg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidginzbourg/subscriptions","organizations_url":"https://api.github.com/users/davidginzbourg/orgs","repos_url":"https://api.github.com/users/davidginzbourg/repos","events_url":"https://api.github.com/users/davidginzbourg/events{/privacy}","received_events_url":"https://api.github.com/users/davidginzbourg/received_events","type":"User","site_admin":false},"body":"--name: Branch names to query\r\n--org: Github organization name to query\r\n--jira-team: Jira team name to be queried\r\n--jira-statuses: Jira statuses to be queried\r\n--thread-limit: Maximum threads running while quering\r\n--output-path: The output path of the .json report file","created_at":"2016-03-13T10:04:08Z","updated_at":"2016-03-22T09:24:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4122db2dc2007e42d3ebb9bde354e1299b319d6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/2/commits","review_comments_url":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/2/comments","review_comment_url":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudify-cosmo/tattle/issues/2/comments","statuses_url":"https://api.github.com/repos/cloudify-cosmo/tattle/statuses/f870976e5f7fbd55ef72c704b03e5a01e965f89d","head":{"label":"cloudify-cosmo:add-cli","ref":"add-cli","sha":"f870976e5f7fbd55ef72c704b03e5a01e965f89d","user":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"repo":{"id":46350470,"name":"tattle","full_name":"cloudify-cosmo/tattle","owner":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudify-cosmo/tattle","description":"Query your GitHub branches and their related JIRA issues","fork":false,"url":"https://api.github.com/repos/cloudify-cosmo/tattle","forks_url":"https://api.github.com/repos/cloudify-cosmo/tattle/forks","keys_url":"https://api.github.com/repos/cloudify-cosmo/tattle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudify-cosmo/tattle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudify-cosmo/tattle/teams","hooks_url":"https://api.github.com/repos/cloudify-cosmo/tattle/hooks","issue_events_url":"https://api.github.com/repos/cloudify-cosmo/tattle/issues/events{/number}","events_url":"https://api.github.com/repos/cloudify-cosmo/tattle/events","assignees_url":"https://api.github.com/repos/cloudify-cosmo/tattle/assignees{/user}","branches_url":"https://api.github.com/repos/cloudify-cosmo/tattle/branches{/branch}","tags_url":"https://api.github.com/repos/cloudify-cosmo/tattle/tags","blobs_url":"https://api.github.com/repos/cloudify-cosmo/tattle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudify-cosmo/tattle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudify-cosmo/tattle/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudify-cosmo/tattle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudify-cosmo/tattle/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudify-cosmo/tattle/languages","stargazers_url":"https://api.github.com/repos/cloudify-cosmo/tattle/stargazers","contributors_url":"https://api.github.com/repos/cloudify-cosmo/tattle/contributors","subscribers_url":"https://api.github.com/repos/cloudify-cosmo/tattle/subscribers","subscription_url":"https://api.github.com/repos/cloudify-cosmo/tattle/subscription","commits_url":"https://api.github.com/repos/cloudify-cosmo/tattle/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudify-cosmo/tattle/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudify-cosmo/tattle/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudify-cosmo/tattle/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudify-cosmo/tattle/contents/{+path}","compare_url":"https://api.github.com/repos/cloudify-cosmo/tattle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudify-cosmo/tattle/merges","archive_url":"https://api.github.com/repos/cloudify-cosmo/tattle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudify-cosmo/tattle/downloads","issues_url":"https://api.github.com/repos/cloudify-cosmo/tattle/issues{/number}","pulls_url":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudify-cosmo/tattle/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudify-cosmo/tattle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudify-cosmo/tattle/labels{/name}","releases_url":"https://api.github.com/repos/cloudify-cosmo/tattle/releases{/id}","deployments_url":"https://api.github.com/repos/cloudify-cosmo/tattle/deployments","created_at":"2015-11-17T13:57:50Z","updated_at":"2016-01-21T21:25:49Z","pushed_at":"2016-03-20T22:11:27Z","git_url":"git://github.com/cloudify-cosmo/tattle.git","ssh_url":"git@github.com:cloudify-cosmo/tattle.git","clone_url":"https://github.com/cloudify-cosmo/tattle.git","svn_url":"https://github.com/cloudify-cosmo/tattle","homepage":"","size":137,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"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":1,"default_branch":"master"}},"base":{"label":"cloudify-cosmo:master","ref":"master","sha":"5feae7e24209385fc7f27201f49350c7cb4dd9d1","user":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"repo":{"id":46350470,"name":"tattle","full_name":"cloudify-cosmo/tattle","owner":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudify-cosmo/tattle","description":"Query your GitHub branches and their related JIRA issues","fork":false,"url":"https://api.github.com/repos/cloudify-cosmo/tattle","forks_url":"https://api.github.com/repos/cloudify-cosmo/tattle/forks","keys_url":"https://api.github.com/repos/cloudify-cosmo/tattle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudify-cosmo/tattle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudify-cosmo/tattle/teams","hooks_url":"https://api.github.com/repos/cloudify-cosmo/tattle/hooks","issue_events_url":"https://api.github.com/repos/cloudify-cosmo/tattle/issues/events{/number}","events_url":"https://api.github.com/repos/cloudify-cosmo/tattle/events","assignees_url":"https://api.github.com/repos/cloudify-cosmo/tattle/assignees{/user}","branches_url":"https://api.github.com/repos/cloudify-cosmo/tattle/branches{/branch}","tags_url":"https://api.github.com/repos/cloudify-cosmo/tattle/tags","blobs_url":"https://api.github.com/repos/cloudify-cosmo/tattle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudify-cosmo/tattle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudify-cosmo/tattle/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudify-cosmo/tattle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudify-cosmo/tattle/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudify-cosmo/tattle/languages","stargazers_url":"https://api.github.com/repos/cloudify-cosmo/tattle/stargazers","contributors_url":"https://api.github.com/repos/cloudify-cosmo/tattle/contributors","subscribers_url":"https://api.github.com/repos/cloudify-cosmo/tattle/subscribers","subscription_url":"https://api.github.com/repos/cloudify-cosmo/tattle/subscription","commits_url":"https://api.github.com/repos/cloudify-cosmo/tattle/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudify-cosmo/tattle/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudify-cosmo/tattle/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudify-cosmo/tattle/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudify-cosmo/tattle/contents/{+path}","compare_url":"https://api.github.com/repos/cloudify-cosmo/tattle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudify-cosmo/tattle/merges","archive_url":"https://api.github.com/repos/cloudify-cosmo/tattle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudify-cosmo/tattle/downloads","issues_url":"https://api.github.com/repos/cloudify-cosmo/tattle/issues{/number}","pulls_url":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudify-cosmo/tattle/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudify-cosmo/tattle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudify-cosmo/tattle/labels{/name}","releases_url":"https://api.github.com/repos/cloudify-cosmo/tattle/releases{/id}","deployments_url":"https://api.github.com/repos/cloudify-cosmo/tattle/deployments","created_at":"2015-11-17T13:57:50Z","updated_at":"2016-01-21T21:25:49Z","pushed_at":"2016-03-20T22:11:27Z","git_url":"git://github.com/cloudify-cosmo/tattle.git","ssh_url":"git@github.com:cloudify-cosmo/tattle.git","clone_url":"https://github.com/cloudify-cosmo/tattle.git","svn_url":"https://github.com/cloudify-cosmo/tattle","homepage":"","size":137,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/2"},"html":{"href":"https://github.com/cloudify-cosmo/tattle/pull/2"},"issue":{"href":"https://api.github.com/repos/cloudify-cosmo/tattle/issues/2"},"comments":{"href":"https://api.github.com/repos/cloudify-cosmo/tattle/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudify-cosmo/tattle/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/cloudify-cosmo/tattle/statuses/f870976e5f7fbd55ef72c704b03e5a01e965f89d"}}}}