Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ae5a98e

Browse files
committed
fix(git): use "git tag -v" return_code to check whether a tag is signed
1 parent 05ab7ad commit ae5a98e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

‎commitizen/git.py‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import re
32
from pathlib import Path
43
from tempfile import NamedTemporaryFile
54
from typing import List, Optional
@@ -143,11 +142,7 @@ def tag_exist(tag: str) -> bool:
143142

144143

145144
def is_signed_tag(tag: str) -> bool:
146-
c = cmd.run(f"git tag -v {tag}")
147-
_ret = False
148-
if re.match("gpg: Signature made [0-9/:A-Za-z ]*", c.err):
149-
_ret = True
150-
return _ret
145+
return cmd.run(f"git tag -v {tag}").return_code == 0
151146

152147

153148
def get_latest_tag_name() -> Optional[str]:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /