mirror of
https://github.com/orhun/git-cliff.git
synced 2024-12-01 21:05:17 +03:00
feat(changelog): skip ssh and x509 signatures in tag messages (#748)
Git supports SSH and x509 signatures in addition to GPG signatures. See <https://git-scm.com/docs/gitformat-signature#_description>. The regex is not 100% accurate (e.g. this would allow `SSH MESSAGE`, which is not part of the gitformat-signature description), but I prioritized readability over correctness in this case (since the code is for replacing text, not verifying the signature).
This commit is contained in:
parent
61a59c6ba1
commit
ecbabbfb39
@ -25,7 +25,8 @@ use url::Url;
|
||||
|
||||
/// Regex for replacing the signature part of a tag message.
|
||||
static TAG_SIGNATURE_REGEX: Lazy<Regex> = lazy_regex!(
|
||||
r"(?s)-----BEGIN PGP SIGNATURE-----(.*?)-----END PGP SIGNATURE-----"
|
||||
// https://git-scm.com/docs/gitformat-signature#_description
|
||||
r"(?s)-----BEGIN (PGP|SSH|SIGNED) (SIGNATURE|MESSAGE)-----(.*?)-----END (PGP|SSH|SIGNED) (SIGNATURE|MESSAGE)-----"
|
||||
);
|
||||
|
||||
/// Wrapper for [`Repository`] type from git2.
|
||||
|
Loading…
Reference in New Issue
Block a user