Skip to content

Commit b53a872

Browse files
committed
make ssh rebuild work with BB builds
1 parent d3efe07 commit b53a872

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src-cljs/frontend/controllers/controls.cljs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,10 @@
476476
(let [api-ch (-> current-state :comms :api)
477477
org-name (vcs-url/org-name vcs-url)
478478
repo-name (vcs-url/repo-name vcs-url)
479+
vcs-type (vcs-url/vcs-type vcs-url)
479480
uuid frontend.async/*uuid*]
480481
(go
481-
(let [api-result (<! (ajax/managed-ajax :post (gstring/format "/api/v1/project/%s/%s/%s/ssh" org-name repo-name build-num)))]
482+
(let [api-result (<! (ajax/managed-ajax :post (gstring/format "/api/v1.1/project/%s/%s/%s/%s/ssh" vcs-type org-name repo-name build-num)))]
482483
(put! api-ch [:retry-build (:status api-result) api-result])
483484
(release-button! uuid (:status api-result))
484485
(when (= :success (:status api-result))
@@ -492,9 +493,10 @@
492493
(let [api-ch (-> current-state :comms :api)
493494
org-name (vcs-url/org-name vcs-url)
494495
repo-name (vcs-url/repo-name vcs-url)
496+
vcs-type (vcs-url/vcs-type vcs-url)
495497
uuid frontend.async/*uuid*]
496498
(go
497-
(let [api-result (<! (ajax/managed-ajax :post (gstring/format "/api/v1/project/%s/%s/%s/ssh-users" org-name repo-name build-num)))]
499+
(let [api-result (<! (ajax/managed-ajax :post (gstring/format "/api/v1.1/project/%s/%s/%s/%s/ssh-users" vcs-type org-name repo-name build-num)))]
498500
(release-button! uuid (:status api-result))))))
499501

500502
(defmethod post-control-event! :followed-repo

0 commit comments

Comments
 (0)