Skip to content

Commit f815ed8

Browse files
authored
add debugging to merge.clj (#342)
1 parent 09a9282 commit f815ed8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

script/merge.clj

Lines changed: 6 additions & 1 deletion
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.pprint :as pp]
67
[clojure.string :as str]
78
[ice.core :as ice]
89
[util :as u]))
@@ -23,6 +24,9 @@
2324

2425
(defn source+target-branch->pr-number [source-branch target-branch]
2526
(let [head-ref-name (str source-branch "->" target-branch)
27+
_ (prn {:source-branch source-branch
28+
:target-branch target-branch
29+
:head-ref-name head-ref-name})
2630
prs (-> (p/shell {:out :string}
2731
"gh" "pr" "list"
2832
"--limit" "1000"
@@ -34,7 +38,8 @@
3438
_ (println "→ Open PR count: " (count prs))
3539
_ (println "→ Open PRs: \n"
3640
(str/join "\n"
37-
(map #(str " " %) (str/split-lines (pr-str prs)))))
41+
(map #(str " " %)
42+
(str/split-lines (with-out-str (pp/pprint prs))))))
3843
_ (ice/p "See: " [:bold "https://github.com/metabase/docs.metabase.github.io/pulls"] " for more details")
3944
_ (println "→ Looking for PR with headRefName:" head-ref-name)
4045
pr-to-merge (first (filter #(= (:headRefName %) head-ref-name) prs))]

0 commit comments

Comments
 (0)