diff-view-commit-details: Ignore hyperlinking with certain email prefixes

Related: https://gitlab.gnome.org/GNOME/gitg/-/issues/440
This commit is contained in:
Hari Rana 2024-02-10 18:18:10 -05:00 committed by Alberto Fanjul
parent 1335904f82
commit f33fed4a62

View file

@ -234,7 +234,18 @@ class Gitg.DiffViewCommitDetails : Gtk.Grid
committer.get_email() != author.get_email() ||
committer.get_time().compare(author.get_time()) != 0)
{
d_label_committer.label = _("<small>Committed by</small> %s").printf(author_to_markup(committer));
if (committer.get_email().has_prefix("noreply@") ||
committer.get_email().has_prefix("no-reply@") ||
committer.get_email().has_prefix("gnome-sysadmin@") ||
committer.get_email().has_prefix("root@") ||
committer.get_email().has_prefix("localhost@"))
{
d_label_committer.label = _("<small>Committed by</small> %s").printf(committer.get_name());
}
else
{
d_label_committer.label = _("<small>Committed by</small> %s").printf(author_to_markup(committer));
}
}
else
{