def list_comments(username, password, repo, issue_number, insecure): """List the comments on a given repo/issue pair.""" auth_token = db_tools.retrieve_githubKey(username, password) if auth_token == '': print("Authentication error") json_response = github_api.get_issue_comments(auth_token, username, repo, issue_number, insecure) print(json_response)
def list_issues(username, password, insecure): """ List a user's assigned issues.""" auth_token = db_tools.retrieve_githubKey(username, password) if auth_token == '': print("Authentication error") json_response = github_api.get_user_issues(auth_token, insecure) print(json_response)
def list_repo_issues(username, password, repo, insecure): """ List the issues from a specific repository.""" auth_token = db_tools.retrieve_githubKey(username, password) if auth_token == '': print("Authentication error") json_response = github_api.get_repo_issues(auth_token, username, repo, insecure) print(json_response)
def delete_comment(username, password, repo, comment_id, insecure): """Delete a given comment within a given repo.""" auth_token = db_tools.retrieve_githubKey(username, password) if auth_token == '': print("Authentication error") json_response = github_api.delete_issue_comment(auth_token, username, repo, comment_id, insecure) print(json_response)
def create_issue(username, password, repo, issue_title, issue_body, insecure): """Create an issue in a given repository.""" auth_token = db_tools.retrieve_githubKey(username, password) if auth_token == '': print("Authentication error") json_response = github_api.create_issue(auth_token, username, repo, issue_title, issue_body, insecure) print(json_response)
def edit_comment(username, password, repo, comment_id, comment_body, insecure): """Edit a specific comment in a given issue of a given repository.""" auth_token = db_tools.retrieve_githubKey(username, password) if auth_token == '': print("Authentication error") json_response = github_api.edit_issue_comment(auth_token, username, repo, comment_id, comment_body, insecure) print(json_response)
def edit_issue(username, password, repo, issue_number, issue_title, issue_body, insecure): """Edit a specific issue in a given repository.""" auth_token = db_tools.retrieve_githubKey(username, password) if auth_token == '': print("Authentication error") json_response = github_api.edit_issue(auth_token, username, repo, issue_number, issue_title, issue_body, insecure) print(json_response)
def create_comment(username, password, repo, issue_number, comment_body, insecure): """Create a comment on an issue.""" auth_token = db_tools.retrieve_githubKey(username, password) if auth_token == '': print("Authentication error") json_response = github_api.create_issue_comment(auth_token, username, repo, issue_number, comment_body, insecure) print(json_response)