slawekjaranowski commented on a change in pull request #27:
URL: 
https://github.com/apache/maven-project-info-reports-plugin/pull/27#discussion_r549178027



##########
File path: 
src/main/java/org/apache/maven/report/projectinfo/CiManagementReport.java
##########
@@ -225,23 +199,29 @@ else if ( isCiManagementSystem( system, "travis" ) )
         }
 
         /**
-         * Checks if a CI management system is bugzilla, continuum...
+         * Search system description.
          *
-         * @return true if the CI management system is bugzilla, continuum..., 
false otherwise.
+         * @param system a system for description
+         * @return system description from properties
          */
-        private boolean isCiManagementSystem( String system, String actual )
+        private String getIntroForManagementSystem( String system )
         {
             if ( StringUtils.isEmpty( system ) )
             {
-                return false;
+                return getI18nString( "general.intro" );
             }
 
-            if ( StringUtils.isEmpty( actual ) )
+            String systemLowerCase = system.toLowerCase( Locale.ENGLISH );
+
+            for ( String systemName : SYSTEMS )

Review comment:
       We check startWith ...

##########
File path: 
src/main/java/org/apache/maven/report/projectinfo/CiManagementReport.java
##########
@@ -225,23 +199,29 @@ else if ( isCiManagementSystem( system, "travis" ) )
         }
 
         /**
-         * Checks if a CI management system is bugzilla, continuum...
+         * Search system description.
          *
-         * @return true if the CI management system is bugzilla, continuum..., 
false otherwise.
+         * @param system a system for description
+         * @return system description from properties
          */
-        private boolean isCiManagementSystem( String system, String actual )
+        private String getIntroForManagementSystem( String system )

Review comment:
       method isCiManagementSystem was used in many if .. else ...
   Now we check list/set of prefix for CI system

##########
File path: 
src/main/java/org/apache/maven/report/projectinfo/CiManagementReport.java
##########
@@ -225,23 +199,29 @@ else if ( isCiManagementSystem( system, "travis" ) )
         }
 
         /**
-         * Checks if a CI management system is bugzilla, continuum...
+         * Search system description.
          *
-         * @return true if the CI management system is bugzilla, continuum..., 
false otherwise.
+         * @param system a system for description
+         * @return system description from properties
          */
-        private boolean isCiManagementSystem( String system, String actual )
+        private String getIntroForManagementSystem( String system )
         {
             if ( StringUtils.isEmpty( system ) )
             {
-                return false;
+                return getI18nString( "general.intro" );
             }
 
-            if ( StringUtils.isEmpty( actual ) )
+            String systemLowerCase = system.toLowerCase( Locale.ENGLISH );
+
+            for ( String systemName : SYSTEMS )
             {
-                return false;
+                if ( systemLowerCase.startsWith( systemName ) )

Review comment:
       It was implemented in this way, probably because user can specific your 
system like Travis CI or some thing more ... so we check startWith
   I don't change this behavior.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to