Skip to content

Commit

Permalink
removing redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
nbshiland committed Jul 31, 2024
1 parent 0f180e1 commit a36632f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions abr-testing/abr_testing/automation/jira_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def __init__(self, url: str, api_token: str, email: str) -> None:
"Content-Type": "application/json",
}

def issues_on_board(self, board_id: str) -> List[List[Any]]:
def issues_on_board(self, project_key: str) -> List[List[Any]]:
"""Print Issues on board."""
params = {"jql": "project = RABR"}
params = {"jql": f"project = {project_key}"}
response = requests.get(
f"{self.url}/rest/api/3/search",
headers=self.headers,
Expand Down Expand Up @@ -82,7 +82,6 @@ def link_issues(self, to_link: list, ticket_key: str) -> None:
auth=self.auth,
data=link_data,
)
print(response)

def open_issue(self, issue_key: str) -> str:
"""Open issue on web browser."""
Expand Down
3 changes: 1 addition & 2 deletions abr-testing/abr_testing/data_collection/abr_robot_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ def get_run_error_info_from_robot(
reporter_id = args.reporter_id[0]
file_paths = read_robot_logs.get_logs(storage_directory, ip)
ticket = jira_tool.JiraTicket(url, api_token, email)
ticket.issues_on_board(board_id)
users_file_path = ticket.get_jira_users(storage_directory)
assignee_id = get_user_id(users_file_path, assignee)
run_log_file_path = ""
Expand Down Expand Up @@ -520,7 +519,7 @@ def get_run_error_info_from_robot(
parent_key = project_key + "-" + robot.split("ABR")[1]

# Grab all previous issues
all_issues = ticket.issues_on_board(board_id)
all_issues = ticket.issues_on_board(project_key)

# TODO: read board to see if ticket for run id already exists.
# CREATE TICKET
Expand Down

0 comments on commit a36632f

Please sign in to comment.