gitpr-cli 0.0.22__tar.gz → 0.0.23__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/PKG-INFO +1 -1
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/PKG-INFO +1 -1
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/pyproject.toml +1 -1
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/core.py +21 -3
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/LICENSE +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/README.md +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/SOURCES.txt +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/dependency_links.txt +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/entry_points.txt +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/requires.txt +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/top_level.txt +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/setup.cfg +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/__init__.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/ai_providers.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/blame_engine.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/cache.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/config.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/i18n.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/issue_engine.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/linter_engine.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/main.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/security.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/spinner.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/tui_issue.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/ui/__init__.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/ui/help_screen.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/ui/issue_app.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/updater.py +0 -0
- {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/tests/test_core.py +0 -0
|
@@ -13,6 +13,22 @@ from src.config import get_api_key, get_api_model
|
|
|
13
13
|
from src.ai_providers import call_ai_model
|
|
14
14
|
from src.i18n import __, CURRENT_LANG
|
|
15
15
|
|
|
16
|
+
# Filtro Smart Diff: ficheiros que gastam tokens da IA sem acrescentar valor semântico
|
|
17
|
+
SMART_EXCLUDES = [
|
|
18
|
+
":(exclude)*.lock",
|
|
19
|
+
":(exclude)package-lock.json",
|
|
20
|
+
":(exclude)yarn.lock",
|
|
21
|
+
":(exclude)pnpm-lock.yaml",
|
|
22
|
+
":(exclude)composer.lock",
|
|
23
|
+
":(exclude)poetry.lock",
|
|
24
|
+
":(exclude)Pipfile.lock",
|
|
25
|
+
":(exclude)Gemfile.lock",
|
|
26
|
+
":(exclude)go.sum",
|
|
27
|
+
":(exclude)*.min.js",
|
|
28
|
+
":(exclude)*.min.css",
|
|
29
|
+
":(exclude)*.svg"
|
|
30
|
+
]
|
|
31
|
+
|
|
16
32
|
|
|
17
33
|
def get_doc_url(filename):
|
|
18
34
|
"""Returns the complete URL for a docs/ file, with language suffix if needed."""
|
|
@@ -46,12 +62,13 @@ def get_git_diff():
|
|
|
46
62
|
click.secho(f"📚 {__('Understand why:')} {get_doc_url('untracked-files.md')}\n", fg="blue", underline=True)
|
|
47
63
|
|
|
48
64
|
# Run the normal diff that captures tracked and staged files
|
|
65
|
+
cmd = ["git", "diff", "HEAD", "--"] + SMART_EXCLUDES
|
|
49
66
|
result = subprocess.run(
|
|
50
|
-
|
|
67
|
+
cmd,
|
|
51
68
|
capture_output=True,
|
|
52
69
|
text=True,
|
|
53
70
|
encoding="utf-8",
|
|
54
|
-
errors="replace",
|
|
71
|
+
errors="replace",
|
|
55
72
|
check=True
|
|
56
73
|
)
|
|
57
74
|
return result.stdout
|
|
@@ -301,8 +318,9 @@ def get_git_full_diff():
|
|
|
301
318
|
|
|
302
319
|
# Diff between that HASH and your CURRENT WORKSPACE (without using HEAD)
|
|
303
320
|
# By passing only the hash, Git compares that commit with the files on your disk.
|
|
321
|
+
cmd = ["git", "diff", ancestor_hash, "--"] + SMART_EXCLUDES
|
|
304
322
|
result = subprocess.run(
|
|
305
|
-
|
|
323
|
+
cmd,
|
|
306
324
|
capture_output=True,
|
|
307
325
|
text=True,
|
|
308
326
|
encoding="utf-8",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|