Follow core's capitalization as commentlink

Although the config sections ignore cases, gerrit core uses
commentlink (lowercase l) in documentation and config sections, while
we used commentLink (uppercase L) in some places. We follow core's
lead and migrate all commentLinks to commentlinks.

Change-Id: Ib3857da46f2ff73e03d57cfbd78a1f041f6ad341
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/its/InitIts.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/its/InitIts.java
index 85ab85f..ddb0e62 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/hooks/its/InitIts.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/its/InitIts.java
@@ -29,7 +29,7 @@
 
 public class InitIts implements InitStep {
 
-  public static String COMMENT_LINK_SECTION = "commentLink";
+  public static String COMMENT_LINK_SECTION = "commentlink";
 
   public static enum TrueFalseEnum {
     TRUE, FALSE;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/its/ItsConfig.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/its/ItsConfig.java
index 7f107bf..4955f8e 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/hooks/its/ItsConfig.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/its/ItsConfig.java
@@ -136,7 +136,7 @@
    */
   public Pattern getIssuePattern() {
     Pattern ret = null;
-    String match = gerritConfig.getString("commentLink", pluginName, "match");
+    String match = gerritConfig.getString("commentlink", pluginName, "match");
     if (match != null) {
       ret = Pattern.compile(match);
     }
@@ -148,7 +148,7 @@
    * @return policy on how necessary association with issues is
    */
   public ItsAssociationPolicy getItsAssociationPolicy() {
-    return gerritConfig.getEnum("commentLink", pluginName, "association",
+    return gerritConfig.getEnum("commentlink", pluginName, "association",
         ItsAssociationPolicy.OPTIONAL);
   }
 }
diff --git a/src/main/resources/Documentation/config-common.md b/src/main/resources/Documentation/config-common.md
index 3d8defd..6ae1b4e 100644
--- a/src/main/resources/Documentation/config-common.md
+++ b/src/main/resources/Documentation/config-common.md
@@ -21,7 +21,7 @@
 So for example having
 
 ```
-[commentLink "@PLUGIN@"]
+[commentlink "@PLUGIN@"]
     match = [Bb][Uu][Gg][ ]*([1-9][0-9]*)
     html = "<a href=\"http://my.issure.tracker.example.org/show_bug.cgi?id=$1\">(bug $1)</a>"
     association = SUGGESTED
diff --git a/src/test/java/com/googlesource/gerrit/plugins/hooks/its/ItsConfigTest.java b/src/test/java/com/googlesource/gerrit/plugins/hooks/its/ItsConfigTest.java
index 39b0455..9848c52 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/hooks/its/ItsConfigTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/hooks/its/ItsConfigTest.java
@@ -411,7 +411,7 @@
   public void testPatternNullMatch() {
     ItsConfig itsConfig = createItsConfig();
 
-    expect(serverConfig.getString("commentLink", "ItsTestName", "match"))
+    expect(serverConfig.getString("commentlink", "ItsTestName", "match"))
         .andReturn(null).atLeastOnce();
 
     replayMocks();
@@ -423,7 +423,7 @@
   public void testPattern() {
     ItsConfig itsConfig = createItsConfig();
 
-    expect(serverConfig.getString("commentLink", "ItsTestName", "match"))
+    expect(serverConfig.getString("commentlink", "ItsTestName", "match"))
         .andReturn("TestPattern").atLeastOnce();
 
     replayMocks();
@@ -435,7 +435,7 @@
   public void testItsAssociationPolicyOptional() {
     ItsConfig itsConfig = createItsConfig();
 
-    expect(serverConfig.getEnum("commentLink", "ItsTestName", "association",
+    expect(serverConfig.getEnum("commentlink", "ItsTestName", "association",
         ItsAssociationPolicy.OPTIONAL))
         .andReturn(ItsAssociationPolicy.OPTIONAL)
         .atLeastOnce();
@@ -449,7 +449,7 @@
   public void testItsAssociationPolicySuggested() {
     ItsConfig itsConfig = createItsConfig();
 
-    expect(serverConfig.getEnum("commentLink", "ItsTestName", "association",
+    expect(serverConfig.getEnum("commentlink", "ItsTestName", "association",
         ItsAssociationPolicy.OPTIONAL))
         .andReturn(ItsAssociationPolicy.SUGGESTED)
         .atLeastOnce();
@@ -463,7 +463,7 @@
   public void testItsAssociationPolicyMandatory() {
     ItsConfig itsConfig = createItsConfig();
 
-    expect(serverConfig.getEnum("commentLink", "ItsTestName", "association",
+    expect(serverConfig.getEnum("commentlink", "ItsTestName", "association",
         ItsAssociationPolicy.OPTIONAL))
         .andReturn(ItsAssociationPolicy.MANDATORY)
         .atLeastOnce();