diff options
| author | Cal <cwolfson58@gmail.com> | 2024-10-23 17:38:18 +1100 |
|---|---|---|
| committer | Cal <cwolfson58@gmail.com> | 2024-10-23 17:38:18 +1100 |
| commit | 296debb19e9b2542dd07de7ea2b9ff66a07dfa71 (patch) | |
| tree | 6b8330bd8e240dfc8cc447b98b08889faeaf5465 | |
| parent | 08469f8d06996e41fdc72b4a00c4f0a45604b877 (diff) | |
| download | SkyHanni-296debb19e9b2542dd07de7ea2b9ff66a07dfa71.tar.gz SkyHanni-296debb19e9b2542dd07de7ea2b9ff66a07dfa71.tar.bz2 SkyHanni-296debb19e9b2542dd07de7ea2b9ff66a07dfa71.zip | |
link to full template, better pattern key fail message
| -rw-r--r-- | buildSrc/src/main/kotlin/skyhannibuildsystem/ChangelogVerification.kt | 2 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/buildSrc/src/main/kotlin/skyhannibuildsystem/ChangelogVerification.kt b/buildSrc/src/main/kotlin/skyhannibuildsystem/ChangelogVerification.kt index 8ac54d6fc..cf2502e43 100644 --- a/buildSrc/src/main/kotlin/skyhannibuildsystem/ChangelogVerification.kt +++ b/buildSrc/src/main/kotlin/skyhannibuildsystem/ChangelogVerification.kt @@ -25,7 +25,7 @@ abstract class ChangelogVerification : DefaultTask() { val prBodyLines get() = prBody.lines() private val prLink = "ignored" - private val templateLocation = "https://github.com/hannibal002/SkyHanni/blob/beta/pull_request_template.md" + private val templateLocation = "https://github.com/hannibal002/SkyHanni/blob/beta/pull_request_template.md?plain=1" @TaskAction fun scanChangelog() { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt index cc251c61f..ad10ba195 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternManager.kt @@ -243,13 +243,15 @@ object RepoPatternManager { setDefaultPatterns() } - val keyShape = Pattern.compile("^(?:[a-z0-9]+\\.)*[a-z0-9]+$") + private val keyShape = Pattern.compile("^(?:[a-z0-9]+\\.)*[a-z0-9]+$") /** * Verify that a key has a valid shape or throw otherwise. */ fun verifyKeyShape(key: String) { - require(keyShape.matches(key)) { "pattern key: \"$key\" failed shape requirements" } + require(keyShape.matches(key)) { + "pattern key: \"$key\" failed shape requirements. Make sure your key only includes lowercase letters, numbers and dots." + } } /** |
