Skip to content

Commit 2bfeced

Browse files
committed
print more info in merge.clj
1 parent 0c8c17b commit 2bfeced

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

script/merge.clj

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[babashka.cli :as cli]
44
[babashka.process :as p]
55
[cheshire.core :as json]
6+
[clojure.string :as str]
67
[ice.core :as ice]
78
[util :as u]))
89

@@ -29,11 +30,16 @@
2930
"--json" "number,headRefName")
3031
:out
3132
(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)))
3743

3844
(defn -main [& args]
3945
(let [{:keys [source-branch target-branch]

0 commit comments

Comments
 (0)