reformat
This commit is contained in:
parent
f757078d80
commit
8ad6997c66
|
@ -119,10 +119,8 @@ instance Show Card where
|
||||||
where
|
where
|
||||||
truncateDesc :: Text -> Text
|
truncateDesc :: Text -> Text
|
||||||
truncateDesc input =
|
truncateDesc input =
|
||||||
let
|
let (fstLine, _) = T.break (== '\n') input
|
||||||
(fstLine, _) = T.break (== '\n') input
|
in if T.length fstLine > 30
|
||||||
in
|
|
||||||
if T.length fstLine > 30
|
|
||||||
then T.take 30 fstLine <> "..."
|
then T.take 30 fstLine <> "..."
|
||||||
else fstLine
|
else fstLine
|
||||||
|
|
||||||
|
@ -176,13 +174,11 @@ createCard hostname username password boardId stackId title description date wee
|
||||||
let url = baseUrl hostname /: "boards" /: T.pack (show boardId) /: "stacks" /: T.pack (show stackId) /: "cards"
|
let url = baseUrl hostname /: "boards" /: T.pack (show boardId) /: "stacks" /: T.pack (show stackId) /: "cards"
|
||||||
let (_, dayOfYear) = toOrdinalDate date.localDay
|
let (_, dayOfYear) = toOrdinalDate date.localDay
|
||||||
let (year, month, day) = toGregorian date.localDay
|
let (year, month, day) = toGregorian date.localDay
|
||||||
let
|
let expandedTitle =
|
||||||
expandedTitle =
|
|
||||||
T.replace "%YY" (T.pack $ show year)
|
T.replace "%YY" (T.pack $ show year)
|
||||||
$ T.replace "%MM" (T.pack $ show month)
|
$ T.replace "%MM" (T.pack $ show month)
|
||||||
$ T.replace "%DD" (T.pack $ show day) title
|
$ T.replace "%DD" (T.pack $ show day) title
|
||||||
let
|
let body =
|
||||||
body =
|
|
||||||
object
|
object
|
||||||
[ "title" .= expandedTitle
|
[ "title" .= expandedTitle
|
||||||
, "type" .= ("plain" :: Text)
|
, "type" .= ("plain" :: Text)
|
||||||
|
|
Loading…
Reference in New Issue