Skip to content

Commit

Permalink
apply the title in pull-request title when there is just one migration
Browse files Browse the repository at this point in the history
  • Loading branch information
dimmyjr-nu committed Oct 1, 2024
1 parent 0d1b52b commit f0af6ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ordnungsamt/render.clj
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
(ns ordnungsamt.render
(:require [clojure.string]
[ordnungsamt.utils :as utils]
[selmer.parser :as selmer]
[selmer.parser]
[selmer.util :refer [without-escaping]]))

(defn render-title [context]
(selmer.parser/render "[Auto] Refactors - {{date}}" context))
(if (-> context :migrations count (= 1))
(selmer.parser/render "[Auto] {{title}}" (-> context :migrations first))
(selmer.parser/render "[Auto] Refactors - {{date}}" context)))

(def migration-template
"## {{title}} [{{created-at}}]
Expand Down

0 comments on commit f0af6ac

Please sign in to comment.