Update.
This commit is contained in:
parent
f8bf8af4d3
commit
ef11ee8821
16
main.py
16
main.py
@ -480,16 +480,12 @@ async def process_repo(url: str, repo_hash: str, is_user_request: bool = False):
|
|||||||
continue
|
continue
|
||||||
new_commits += 1
|
new_commits += 1
|
||||||
diff = run_git_command(str(repo_path), ["show", commit, "--no-color", "--format=medium"])
|
diff = run_git_command(str(repo_path), ["show", commit, "--no-color", "--format=medium"])
|
||||||
messages = f"### Commit: `{commit}`\n{diff}"
|
prompt = (
|
||||||
prompt = f"""1. Generate a git one liner based on git diff
|
"Generate a describtion about what is done (or fixed) functionally for end users.\n"
|
||||||
2. Example of a good message is: `feat: Enhanced message display with emojis and code highlighting`
|
"Allowed prefixes: feat, fix, security, change.\n"
|
||||||
3. Example of a good message is: `fix: Fixed a bug that caused the app to crash`
|
"No explanations.\n\n"
|
||||||
4. Example of a good message is: `docs: Updated README with installation instructions`
|
f"GIT DIFF:\n{diff}\n"
|
||||||
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}"""
|
|
||||||
for _ in range(3):
|
for _ in range(3):
|
||||||
try:
|
try:
|
||||||
ai = client.APIClient()
|
ai = client.APIClient()
|
||||||
|
Loading…
Reference in New Issue
Block a user