implement presentation of trigger trigger-simple-stub
authorEugene.Petrenko <eugene.petrenko@gmail.com>
Tue, 12 Jul 2011 12:13:17 +0000 (16:13 +0400)
committerEugene.Petrenko <eugene.petrenko@gmail.com>
Wed, 13 Jul 2011 16:50:48 +0000 (20:50 +0400)
nuget-server/src/jetbrains/buildServer/nuget/server/trigger/NuGetSimpleTrigger.java

index edb387f8054d26df0d764f306811ec58e3273ff8..8dc1568274c0040dfb527235b4f3cceaa0af035b 100644 (file)
@@ -37,7 +37,18 @@ public class NuGetSimpleTrigger extends BuildTriggerService {
   @NotNull\r
   @Override\r
   public String describeTrigger(@NotNull final BuildTriggerDescriptor trigger) {\r
-    return "Triggers build on NuGet dependency change";\r
+    Map<String, String> props = trigger.getProperties();\r
+    StringBuilder sb = new StringBuilder();\r
+    sb.append("Package Id: ").append(props.get(TriggerConstants.PACKAGE)).append("\n");\r
+    sb.append("Source: ").append(props.get(TriggerConstants.PACKAGE));\r
+\r
+    String version = props.get(TriggerConstants.VERSION);\r
+    if (!StringUtil.isEmptyOrSpaces(version)) {\r
+      sb.append("\n");\r
+      sb.append("Version: ").append(version);\r
+    }\r
+\r
+    return sb.toString();\r
   }\r
 \r
   @NotNull\r