refactor: move GitHub-specific code into class

Add a new method, get_issue_url(), which returns
the VCS-specific web URL for viewing an issue.
This results in moving GitHub-specific code from
main into GitHubClient, but with no change in behavior.
This commit is contained in:
Robert Alonso
2024-10-24 22:36:26 +00:00
parent 714153eaf3
commit c05a9e3f1a
2 changed files with 3 additions and 1 deletions

View File

@@ -351,3 +351,5 @@ class GitHubClient(object):
return pr_update_request.status_code
return pr_request.status_code
def get_issue_url(self, new_issue_number):
return f'Issue URL: {self.line_base_url}{self.repo}/issues/{new_issue_number}'