Skip to content

Commit f130efb

Browse files
authored
Merge pull request #25 from SingularityX-ai/penify/auto_doc_a23ab49_72d64
[Penify]: Documentation for commit - a23ab49
2 parents 8d832f1 + 91dcb60 commit f130efb

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
@@ -101,13 +101,18 @@ def get_supported_file_types(self) -> list[str]:
101101
return ["py", "js", "ts", "java", "kt", "cs", "c"]
102102

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

0 commit comments

Comments
 (0)