Skip to content

Commit

Permalink
Merge pull request #377 from gitautoai/wes
Browse files Browse the repository at this point in the history
Remove an unused argument from get_latest_remote_commit_sha
  • Loading branch information
hiroshinishio authored Nov 17, 2024
2 parents 0270c72 + 61d778f commit 33ab080
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion services/gitauto_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ async def handle_gitauto(payload: GitHubLabeledPayload, trigger_type: str) -> No
comment_body = "Looks like it's doable. Creating the remote branch..."
update_comment(body=comment_body, base_args=base_args, p=30)
latest_commit_sha: str = get_latest_remote_commit_sha(
unique_issue_id=unique_issue_id,
clone_url=repo["clone_url"],
base_args=base_args,
)
Expand Down
8 changes: 2 additions & 6 deletions services/github/github_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,7 @@ def get_issue_comments(


@handle_exceptions(raise_on_error=True)
def get_latest_remote_commit_sha(
unique_issue_id: str, clone_url: str, base_args: BaseArgs
) -> str:
def get_latest_remote_commit_sha(clone_url: str, base_args: BaseArgs) -> str:
"""SHA stands for Secure Hash Algorithm. It's a unique identifier for a commit.
https://docs.github.com/en/rest/git/refs?apiVersion=2022-11-28#get-a-reference"""
owner, repo, branch = (
Expand All @@ -479,9 +477,7 @@ def get_latest_remote_commit_sha(
)
initialize_repo(repo_path=f"/tmp/repo/{owner}-{repo}", remote_url=clone_url)
return get_latest_remote_commit_sha(
unique_issue_id=unique_issue_id,
clone_url=clone_url,
base_args=base_args,
clone_url=clone_url, base_args=base_args
)
raise
except Exception as e:
Expand Down

0 comments on commit 33ab080

Please sign in to comment.