File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 83
83
(gstring/format " %s/invite"
84
84
(base-organization-url-path vcs-type org-name)))
85
85
86
+ (defn project-hook-test [vcs-type project-name service-name]
87
+ (gstring/format
88
+ " %s/%s/hooks/%s/test"
89
+ (base-project-url-path vcs-type)
90
+ project-name
91
+ service-name))
92
+
86
93
(defn build-retry [vcs-type org-name repo-name build-num]
87
94
(gstring/format
88
95
" %s/%s/%s/%s/retry"
Original file line number Diff line number Diff line change 773
773
[target message {:keys [project-id merge-paths service]} previous-state current-state]
774
774
(let [uuid frontend.async/*uuid*
775
775
project-name (vcs-url/project-name project-id)
776
+ vcs-type (vcs-url/vcs-type project-id)
776
777
comms (get-in current-state [:comms ])]
777
778
(go
778
779
(let [save-result (<! (save-project-settings project-id merge-paths current-state))
779
780
test-result (if (= (:status save-result) :success )
780
- (let [test-result (<! (ajax/managed-ajax :post (gstring/format " /api/v1/project/%s/hooks/%s/test" project-name service)
781
- :params {:project-id project-id}))]
781
+ (let [test-result
782
+ (<! (ajax/managed-ajax
783
+ :post (api-path/project-hook-test vcs-type project-name service)
784
+ :params {:project-id project-id}))]
782
785
(when (not= (:status test-result) :success )
783
786
(put! (:errors comms) [:api-error test-result]))
784
787
test-result)
You can’t perform that action at this time.
0 commit comments