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.
Files changed (29) hide show
  1. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/PKG-INFO +1 -1
  2. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/PKG-INFO +1 -1
  3. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/pyproject.toml +1 -1
  4. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/core.py +21 -3
  5. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/LICENSE +0 -0
  6. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/README.md +0 -0
  7. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/SOURCES.txt +0 -0
  8. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/dependency_links.txt +0 -0
  9. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/entry_points.txt +0 -0
  10. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/requires.txt +0 -0
  11. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/gitpr_cli.egg-info/top_level.txt +0 -0
  12. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/setup.cfg +0 -0
  13. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/__init__.py +0 -0
  14. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/ai_providers.py +0 -0
  15. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/blame_engine.py +0 -0
  16. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/cache.py +0 -0
  17. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/config.py +0 -0
  18. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/i18n.py +0 -0
  19. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/issue_engine.py +0 -0
  20. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/linter_engine.py +0 -0
  21. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/main.py +0 -0
  22. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/security.py +0 -0
  23. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/spinner.py +0 -0
  24. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/tui_issue.py +0 -0
  25. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/ui/__init__.py +0 -0
  26. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/ui/help_screen.py +0 -0
  27. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/ui/issue_app.py +0 -0
  28. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/src/updater.py +0 -0
  29. {gitpr_cli-0.0.22 → gitpr_cli-0.0.23}/tests/test_core.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitpr-cli
3
- Version: 0.0.22
3
+ Version: 0.0.23
4
4
  Summary: Automação de PRs, Commits e Code Review com IA (Gemini e DeepSeek)
5
5
  Author-email: Natan Fiuza <contato@natanfiuza.dev.br>
6
6
  Requires-Python: >=3.10
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitpr-cli
3
- Version: 0.0.22
3
+ Version: 0.0.23
4
4
  Summary: Automação de PRs, Commits e Code Review com IA (Gemini e DeepSeek)
5
5
  Author-email: Natan Fiuza <contato@natanfiuza.dev.br>
6
6
  Requires-Python: >=3.10
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gitpr-cli"
7
- version = "0.0.22"
7
+ version = "0.0.23"
8
8
  description = "Automação de PRs, Commits e Code Review com IA (Gemini e DeepSeek)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -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
- ["git", "diff", "HEAD"],
67
+ cmd,
51
68
  capture_output=True,
52
69
  text=True,
53
70
  encoding="utf-8",
54
- errors="replace", # <--- CORREÇÃO AQUI (Evita crash com acentos)
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
- ["git", "diff", ancestor_hash],
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