This commit is contained in:
retoor 2025-08-04 21:25:12 +02:00
parent f8bf8af4d3
commit ef11ee8821

16
main.py
View File

@ -480,16 +480,12 @@ async def process_repo(url: str, repo_hash: str, is_user_request: bool = False):
continue
new_commits += 1
diff = run_git_command(str(repo_path), ["show", commit, "--no-color", "--format=medium"])
messages = f"### Commit: `{commit}`\n{diff}"
prompt = f"""1. Generate a git one liner based on git diff
2. Example of a good message is: `feat: Enhanced message display with emojis and code highlighting`
3. Example of a good message is: `fix: Fixed a bug that caused the app to crash`
4. Example of a good message is: `docs: Updated README with installation instructions`
5. Example of a good message is: `refactor: Simplified user authentication logic for better readability`
6. Example of a good message is `build: Upgraded project dependencies to latest versions`
7. Prefixes available to use in the message are: feat, fix, docs, refactor, build.
8. Do not include explanations in your response. It must look like human written.
9. The diff to respond to with a git one liner: {messages}"""
prompt = (
"Generate a describtion about what is done (or fixed) functionally for end users.\n"
"Allowed prefixes: feat, fix, security, change.\n"
"No explanations.\n\n"
f"GIT DIFF:\n{diff}\n"
)
for _ in range(3):
try:
ai = client.APIClient()