Title: [238959] trunk/Tools
Revision
238959
Author
aakash_j...@apple.com
Date
2018-12-07 10:51:39 -0800 (Fri, 07 Dec 2018)

Log Message

[ews-build] Builds should have a link to patch and bug
https://bugs.webkit.org/show_bug.cgi?id=192492

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(ConfigureBuild.add_patch_id_url): Method to add Patch URL.
(ConfigureBuild.add_bug_id_url): Method to add Bug URL.
(ConfigureBuild.getPatchURL): Method to get Patch URL.
(ConfigureBuild.getBugURL): Method to get Bug URL.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps.py (238958 => 238959)


--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2018-12-07 18:51:36 UTC (rev 238958)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2018-12-07 18:51:39 UTC (rev 238959)
@@ -28,6 +28,7 @@
 
 import re
 
+BUG_SERVER_URL = 'https://bugs.webkit.org/'
 EWS_URL = 'http://ews-build.webkit-uat.org/'
 WithProperties = properties.WithProperties
 Interpolate = properties.Interpolate
@@ -62,10 +63,33 @@
             self.setProperty("buildOnly", self.buildOnly, 'config.json')
         if self.additionalArguments:
             self.setProperty("additionalArguments", self.additionalArguments, 'config.json')
+
+        self.add_patch_id_url()
+        self.add_bug_id_url()
         self.finished(SUCCESS)
         return defer.succeed(None)
 
+    def add_patch_id_url(self):
+        patch_id = self.getProperty('patch_id', '')
+        if patch_id:
+            self.addURL('Patch {}'.format(patch_id), self.getPatchURL(patch_id))
 
+    def add_bug_id_url(self):
+        bug_id = self.getProperty('bug_id', '')
+        if bug_id:
+            self.addURL('Bug {}'.format(bug_id), self.getBugURL(bug_id))
+
+    def getPatchURL(self, patch_id):
+        if not patch_id:
+            return None
+        return '{}attachment.cgi?id={}'.format(BUG_SERVER_URL, patch_id)
+
+    def getBugURL(self, bug_id):
+        if not bug_id:
+            return None
+        return '{}show_bug.cgi?id={}'.format(BUG_SERVER_URL, bug_id)
+
+
 class CheckOutSource(svn.SVN):
     CHECKOUT_DELAY_AND_MAX_RETRIES_PAIR = (0, 2)
 

Modified: trunk/Tools/ChangeLog (238958 => 238959)


--- trunk/Tools/ChangeLog	2018-12-07 18:51:36 UTC (rev 238958)
+++ trunk/Tools/ChangeLog	2018-12-07 18:51:39 UTC (rev 238959)
@@ -1,5 +1,18 @@
 2018-12-07  Aakash Jain  <aakash_j...@apple.com>
 
+        [ews-build] Builds should have a link to patch and bug
+        https://bugs.webkit.org/show_bug.cgi?id=192492
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (ConfigureBuild.add_patch_id_url): Method to add Patch URL.
+        (ConfigureBuild.add_bug_id_url): Method to add Bug URL.
+        (ConfigureBuild.getPatchURL): Method to get Patch URL.
+        (ConfigureBuild.getBugURL): Method to get Bug URL.
+
+2018-12-07  Aakash Jain  <aakash_j...@apple.com>
+
         [ews-app] Configure logfile for ews-app logs
         https://bugs.webkit.org/show_bug.cgi?id=192493
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to