File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 3
3
[babashka.cli :as cli]
4
4
[babashka.process :as p]
5
5
[cheshire.core :as json]
6
+ [clojure.string :as str]
6
7
[ice.core :as ice]
7
8
[util :as u]))
8
9
29
30
" --json" " number,headRefName" )
30
31
:out
31
32
(json/parse-string true )
32
- (into []))]
33
- (println " → PRs found: " (count prs))
34
- (ice/p " See: " [:bold " https://github.com/metabase/docs.metabase.github.io/pulls" ] " for more details" )
35
- (println " → Looking for PR with headRefName:" head-ref-name)
36
- (->> prs (filter #(= (:headRefName %) head-ref-name)) first :number )))
33
+ (into []))
34
+ _ (println " → Open PR count: " (count prs))
35
+ _ (println " → Open PRs: \n "
36
+ (str/join " \n "
37
+ (map #(str " " %) (str/split-lines (pr-str prs)))))
38
+ _ (ice/p " See: " [:bold " https://github.com/metabase/docs.metabase.github.io/pulls" ] " for more details" )
39
+ _ (println " → Looking for PR with headRefName:" head-ref-name)
40
+ pr-to-merge (first (filter #(= (:headRefName %) head-ref-name) prs))]
41
+ (println " Found PR: " (pr-str pr-to-merge))
42
+ (:number pr-to-merge)))
37
43
38
44
(defn -main [& args]
39
45
(let [{:keys [source-branch target-branch]
You can’t perform that action at this time.
0 commit comments