diff mbox series

[kteam-tools,PATCHv2,2/3] create-stable-tracker: fix hardcoded --staging buglink URL

Message ID 1535391003-20277-3-git-send-email-kamal@canonical.com
State New
Headers show
Series create-stable-tracker --version 'patchset' and cleanups | expand

Commit Message

Kamal Mostafa Aug. 27, 2018, 5:30 p.m. UTC
When --staging is used, generate the proper URL to the new bug from
launchpad_services_root instead of hardcoding "qastaging".  This
presents the correct URL regardless of which Launchpad service
('qastaging' or 'staging') is in use.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 stable/create-stable-tracker | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/stable/create-stable-tracker b/stable/create-stable-tracker
index 3dd03ac..0816e33 100755
--- a/stable/create-stable-tracker
+++ b/stable/create-stable-tracker
@@ -201,7 +201,7 @@  class CreateTrackingBug(StdApp):
                         nomination.approve()
 
             if 'staging' in self.cfg:
-                print("https://bugs.qastaging.launchpad.net/bugs/%s" % (bug.id))
+                print("https://bugs.%s.launchpad.net/bugs/%s" % (self.defaults['launchpad_services_root'], bug.id))
             else:
                 print("https://bugs.launchpad.net/bugs/%s" % (bug.id))