-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommit_gen.pyi
More file actions
41 lines (30 loc) · 949 Bytes
/
Copy pathcommit_gen.pyi
File metadata and controls
41 lines (30 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
Commit message generation for Diffron.
Generates Conventional Commits format messages from git diffs.
"""
from typing import Optional
from .lemonade import LemonadeClient
COMMIT_TYPES: list[str]
DEFAULT_MAX_CHARS: int
DEFAULT_MAX_TOKENS: int
DEFAULT_TEMPERATURE: float
def generate_commit_message(
diff: Optional[str] = None,
max_chars: Optional[int] = None,
max_tokens: Optional[int] = None,
temperature: Optional[float] = None,
client: Optional[LemonadeClient] = None,
) -> str:
"""Generate a commit message from a git diff."""
...
def validate_commit_type(message: str) -> bool:
"""Validate that a commit message starts with a valid Conventional Commits type."""
...
def format_commit_message(
commit_type: str,
description: str,
scope: Optional[str] = None,
breaking: bool = False,
) -> str:
"""Format a commit message with proper Conventional Commits structure."""
...