File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
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.pprint :as pp]
6
7
[clojure.string :as str]
7
8
[ice.core :as ice]
8
9
[util :as u]))
23
24
24
25
(defn source+target-branch->pr-number [source-branch target-branch]
25
26
(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})
26
30
prs (-> (p/shell {:out :string }
27
31
" gh" " pr" " list"
28
32
" --limit" " 1000"
34
38
_ (println " → Open PR count: " (count prs))
35
39
_ (println " → Open PRs: \n "
36
40
(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))))))
38
43
_ (ice/p " See: " [:bold " https://github.com/metabase/docs.metabase.github.io/pulls" ] " for more details" )
39
44
_ (println " → Looking for PR with headRefName:" head-ref-name)
40
45
pr-to-merge (first (filter #(= (:headRefName %) head-ref-name) prs))]
You can’t perform that action at this time.
0 commit comments