Skip to content

Commit 91dcb60

Browse files
[Penify]: Documentation for commit - a23ab49
1 parent a23ab49 commit 91dcb60

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

penify_hook/api_client.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,18 @@ def get_supported_file_types(self) -> list[str]:
100100
return ["py", "js", "ts", "java", "kt", "cs", "c"]
101101

102102
def generate_commit_summary(self, git_diff, instruction: str = "", repo_details = None):
103-
"""
104-
Generates a commit summary by sending a POST request to the API endpoint.
103+
"""Generate a commit summary by sending a POST request to the API endpoint.
104+
105+
This function constructs a payload containing the git diff and any
106+
additional instructions provided. It then sends this payload to a
107+
specified API endpoint to generate a summary of the commit. If the
108+
request is successful, it returns the response from the API; otherwise,
109+
it returns None.
105110
106111
Args:
107112
git_diff (str): The git diff of the commit.
108-
instruction (str, optional): Additional instruction for the commit. Defaults to "".
109-
repo_details (dict, optional): Details of the git repository. Defaults to None.
113+
instruction (str?): Additional instruction for the commit. Defaults to "".
114+
repo_details (dict?): Details of the git repository. Defaults to None.
110115
111116
Returns:
112117
dict: The response from the API if the request is successful, None otherwise.

0 commit comments

Comments
 (0)