From 0fb81cddb65bfa59ceb26f786e64d0b9c2240a74 Mon Sep 17 00:00:00 2001 From: Zac Sweers Date: Wed, 21 Jun 2023 16:58:06 -0400 Subject: [PATCH] Add an optional description to Issue (#21) Since we can't put comments in JSON, this is the next best thing. --- src/main/kotlin/slack/cli/exec/Issue.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/slack/cli/exec/Issue.kt b/src/main/kotlin/slack/cli/exec/Issue.kt index d8b4036..e9ccacf 100644 --- a/src/main/kotlin/slack/cli/exec/Issue.kt +++ b/src/main/kotlin/slack/cli/exec/Issue.kt @@ -27,6 +27,9 @@ import com.squareup.moshi.JsonClass * @property matchingText the matching text to look for in the log. * @property groupingHash grouping hash for reporting to bugsnag. This should usually be unique, but * can also be reused across issues that are part of the same general issue. + * @property retrySignal the [RetrySignal] to use when this issue is found. + * @property description an optional description of the issue. Not used in the CLI, just there for + * documentation in the config. */ @JsonClass(generateAdapter = true) internal data class Issue( @@ -34,7 +37,8 @@ internal data class Issue( @Json(name = "log_message") val logMessage: String, @Json(name = "matching_text") val matchingText: String, @Json(name = "grouping_hash") val groupingHash: String, - @Json(name = "retry_signal") val retrySignal: RetrySignal + @Json(name = "retry_signal") val retrySignal: RetrySignal, + val description: String? = null, ) { private fun List.checkContains(errorText: String): Boolean {