From c6560c0ffecb2955aa229dbef7e8ebcb29855774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Krzemi=C5=84ski?= <3110813+krzema12@users.noreply.github.com> Date: Mon, 20 Jul 2026 22:54:32 +0200 Subject: [PATCH 1/2] fix(lib): reword misleading error if no actions/checkout in classpath --- .../github/typesafegithub/workflows/yaml/ConsistencyCheckJob.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-workflows-kt/src/main/kotlin/io/github/typesafegithub/workflows/yaml/ConsistencyCheckJob.kt b/github-workflows-kt/src/main/kotlin/io/github/typesafegithub/workflows/yaml/ConsistencyCheckJob.kt index a53e2b84f..5e4ac2385 100644 --- a/github-workflows-kt/src/main/kotlin/io/github/typesafegithub/workflows/yaml/ConsistencyCheckJob.kt +++ b/github-workflows-kt/src/main/kotlin/io/github/typesafegithub/workflows/yaml/ConsistencyCheckJob.kt @@ -129,7 +129,7 @@ private fun inferCheckoutActionVersionFromClasspath(checkoutActionClassFQN: Stri error( "actions/checkout is not found in the classpath! " + "Either add a dependency on it (`@file:DependsOn(\"actions:checkout:\")`), " + - "or don't use CheckoutActionVersionSource.InferFromClasspath()", + "or use another CheckoutActionVersionSource.", ) } as Class<*> // It's easier to call the primary constructor, even though it's private, because From 97835d29a235f9fdd5186fb467ae3858b16e07f9 Mon Sep 17 00:00:00 2001 From: Piotr Krzeminski Date: Tue, 21 Jul 2026 09:26:25 +0200 Subject: [PATCH 2/2] Adjust tests --- .../io/github/typesafegithub/workflows/IntegrationTest.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/github-workflows-kt/src/test/kotlin/io/github/typesafegithub/workflows/IntegrationTest.kt b/github-workflows-kt/src/test/kotlin/io/github/typesafegithub/workflows/IntegrationTest.kt index 43568fbe4..083b0fec2 100644 --- a/github-workflows-kt/src/test/kotlin/io/github/typesafegithub/workflows/IntegrationTest.kt +++ b/github-workflows-kt/src/test/kotlin/io/github/typesafegithub/workflows/IntegrationTest.kt @@ -22,6 +22,7 @@ import io.kotest.assertions.throwables.shouldThrow import io.kotest.core.spec.style.FunSpec import io.kotest.engine.spec.tempdir import io.kotest.matchers.shouldBe +import io.kotest.matchers.string.shouldStartWith @OptIn(ExperimentalKotlinLogicStep::class) @Suppress("LargeClass") @@ -460,9 +461,7 @@ class IntegrationTest : } } }.also { - it.message shouldBe "actions/checkout is not found in the classpath! " + - "Either add a dependency on it (`@file:DependsOn(\"actions:checkout:\")`), " + - "or don't use CheckoutActionVersionSource.InferFromClasspath()" + it.message shouldStartWith "actions/checkout is not found in the classpath!" } }