commitmessagegenerator 1.1.1__py3-none-any.whl → 1.1.3__py3-none-any.whl

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.
@@ -4,22 +4,26 @@ from .generator import gerar_mensagem_commit
4
4
 
5
5
  def main():
6
6
  parser = argparse.ArgumentParser(description="Gerador de mensagens de commit com IA")
7
- parser.add_argument("-c", action="store_true", help="Faz o commit com a mensagem gerada")
8
- parser.add_argument("-cp", action="store_true", help="Faz o commit e push")
7
+ parser.add_argument("-c", action="store_true", help="Commits with the generated message")
8
+ parser.add_argument("-cp", action="store_true", help="Commits and pushes with the generated message")
9
9
  args = parser.parse_args()
10
10
 
11
11
  mensagem = gerar_mensagem_commit()
12
12
 
13
- if "Nenhuma alteração detectada" in mensagem:
13
+ if "No changes detected" in mensagem:
14
14
  print(mensagem)
15
15
  return
16
16
 
17
- print("\nMensagem gerada:\n" + mensagem)
17
+ print("\nGenerated commit message:\n" + mensagem)
18
18
 
19
19
  if args.c or args.cp:
20
- print("\nExecutando commit...")
20
+ print("\nCommitting changes...")
21
21
  subprocess.run(["git", "commit", "-m", mensagem])
22
22
 
23
23
  if args.cp:
24
- print("\nExecutando push...")
24
+ print("\nPushing changes...")
25
25
  subprocess.run(["git", "push"])
26
+
27
+ elif not args.c or not args.cp:
28
+ print("\nRemoving staged changes (git reset)...")
29
+ subprocess.run(["git", "reset"])
@@ -15,7 +15,7 @@ def gerar_mensagem_commit():
15
15
  repo = Repo(os.getcwd())
16
16
 
17
17
  # Inclui arquivos staged (adicionados ou modificados)
18
- #repo.git.add(all=True)
18
+ repo.git.add(all=True)
19
19
  diff = repo.git.diff("--cached")
20
20
 
21
21
  if not diff.strip():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: commitmessagegenerator
3
- Version: 1.1.1
3
+ Version: 1.1.3
4
4
  Summary: Generate commit messages with AI (Google Gemini) automatically using `git diff`.
5
5
  Author-email: Gabriel Terceiro <gcarolinoterceiro@gmail.com>
6
6
  License: MIT
@@ -0,0 +1,9 @@
1
+ commitmessagegenerator/__init__.py,sha256=Wsl1vaSI5fWuK3B9MfZnPp1PxnRfTmnvW_20vgswgT0,45
2
+ commitmessagegenerator/cli.py,sha256=0ooKCg4T8uoMD1w4dc2GwOuYqsaMCk7dl_51NK4M8IA,980
3
+ commitmessagegenerator/generator.py,sha256=c32Z0jTafzGVo0alQyRaOUGn63c40hr55hnRWl4KbH8,1407
4
+ commitmessagegenerator-1.1.3.dist-info/licenses/LICENSE,sha256=q7KJbcPCqUAvkBuI1QNc8Kg9XPfBfnNkLN9WKwudO8U,11
5
+ commitmessagegenerator-1.1.3.dist-info/METADATA,sha256=W74m1O1v4QemICoR4zHwAKMXfDLAosyCcOfta60azYg,1707
6
+ commitmessagegenerator-1.1.3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
7
+ commitmessagegenerator-1.1.3.dist-info/entry_points.txt,sha256=VmVQY00e0SuHsTFZmOCcyN0VYCQlVnZrdZNJdUGLCVo,62
8
+ commitmessagegenerator-1.1.3.dist-info/top_level.txt,sha256=G8wUZw8MTtvYs1WgehFVTPKqw5Td7gGedZZIQbZH1Co,23
9
+ commitmessagegenerator-1.1.3.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- commitmessagegenerator/__init__.py,sha256=Wsl1vaSI5fWuK3B9MfZnPp1PxnRfTmnvW_20vgswgT0,45
2
- commitmessagegenerator/cli.py,sha256=aXx5i_g5_YSDBvf0k1I7kYPLQX4dmTNKAuxgHtMjMmI,814
3
- commitmessagegenerator/generator.py,sha256=dDYEs4B9XhTcFLCmjlB_GgGm4je5nmPnALLAd_NWaOU,1408
4
- commitmessagegenerator-1.1.1.dist-info/licenses/LICENSE,sha256=q7KJbcPCqUAvkBuI1QNc8Kg9XPfBfnNkLN9WKwudO8U,11
5
- commitmessagegenerator-1.1.1.dist-info/METADATA,sha256=hGIr4yyHOjQuUOKRHjUNxjZQJJhpYP15agjf5fnYxDE,1707
6
- commitmessagegenerator-1.1.1.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
7
- commitmessagegenerator-1.1.1.dist-info/entry_points.txt,sha256=VmVQY00e0SuHsTFZmOCcyN0VYCQlVnZrdZNJdUGLCVo,62
8
- commitmessagegenerator-1.1.1.dist-info/top_level.txt,sha256=G8wUZw8MTtvYs1WgehFVTPKqw5Td7gGedZZIQbZH1Co,23
9
- commitmessagegenerator-1.1.1.dist-info/RECORD,,