Skip to content

Commit

Permalink
even shorter descriptions in logs, inline the description
Browse files Browse the repository at this point in the history
  • Loading branch information
majk-p committed Mar 7, 2022
1 parent 2a87c78 commit 8f698c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions core/src/main/scala/io/pg/TextUtils.scala
Expand Up @@ -8,4 +8,7 @@ object TextUtils {
else s
}

def inline(s: String): String =
s.replaceAll("\n", " ")

}
2 changes: 1 addition & 1 deletion gitlab/src/main/scala/io/pg/gitlab/Gitlab.scala
Expand Up @@ -72,7 +72,7 @@ object Gitlab {
}

implicit val showTrimmed: Show[MergeRequestInfo] =
MergeRequestInfo.description.modify(_.map(TextUtils.trim(maxChars = 80))).apply(_).toString
MergeRequestInfo.description.modify(_.map(TextUtils.inline).map(TextUtils.trim(maxChars = 30))).apply(_).toString
}

def sttpInstance[F[_]: Logger: MonadError[*[_], Throwable]](
Expand Down

0 comments on commit 8f698c8

Please sign in to comment.