Disambiguate names of email pattern config options
Ifaee5073df introduced rejectedAuthorEmailPattern and
rejectedCommitterEmailPattern but used the same display name as used for
these new options as the names used for allowedAuthorEmailPattern and
allowedCommitterEmailPattern.
Fix this by chosing different display names for the allowed and rejected
email pattern options.
Also improve the explanations shown in tooltips.
Change-Id: I6148c670844caa062aa4ace8b2cdf7f681a324e6
diff --git a/src/main/java/com/googlesource/gerrit/plugins/uploadvalidator/ChangeEmailValidator.java b/src/main/java/com/googlesource/gerrit/plugins/uploadvalidator/ChangeEmailValidator.java
index 328bfa9..e42c429 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/uploadvalidator/ChangeEmailValidator.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/uploadvalidator/ChangeEmailValidator.java
@@ -44,45 +44,45 @@
.annotatedWith(Exports.named(KEY_ALLOWED_AUTHOR_EMAIL_PATTERN))
.toInstance(
new ProjectConfigEntry(
- "Author Email Pattern",
+ "Allowed Author Email Pattern",
null,
ProjectConfigEntryType.ARRAY,
null,
false,
- "Commits with author email not matching one of these pattterns will be"
- + " rejected."));
+ "Only commits with author email matching one of these regex patterns will"
+ + " be allowed."));
bind(ProjectConfigEntry.class)
.annotatedWith(Exports.named(KEY_REJECTED_AUTHOR_EMAIL_PATTERN))
.toInstance(
new ProjectConfigEntry(
- "Author Email Pattern",
+ "Rejected Author Email Pattern",
null,
ProjectConfigEntryType.ARRAY,
null,
false,
- "Commits with author email matching one of these pattterns will be"
+ "Commits with author email matching one of these regex patterns will be"
+ " rejected."));
bind(ProjectConfigEntry.class)
.annotatedWith(Exports.named(KEY_ALLOWED_COMMITTER_EMAIL_PATTERN))
.toInstance(
new ProjectConfigEntry(
- "Committer Email Pattern",
+ "Allowed Committer Email Pattern",
null,
ProjectConfigEntryType.ARRAY,
null,
false,
- "Commits with committer email not matching one of these patterns will be"
- + " rejected."));
+ "Only commits with committer email matching one of these regex patterns will"
+ + " be allowed."));
bind(ProjectConfigEntry.class)
.annotatedWith(Exports.named(KEY_REJECTED_COMMITTER_EMAIL_PATTERN))
.toInstance(
new ProjectConfigEntry(
- "Committer Email Pattern",
+ "Rejected Committer Email Pattern",
null,
ProjectConfigEntryType.ARRAY,
null,
false,
- "Commits with committer email matching one of these patterns will be"
+ "Commits with committer email matching one of these regex patterns will be"
+ " rejected."));
}
};