You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/domain/ActionCoords.kt
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -11,24 +11,28 @@ public data class ActionCoords(
11
11
* A top-level action is an action with its `action.y(a)ml` file in the repository root, as opposed to actions stored
12
12
* in subdirectories.
13
13
*/
14
-
publicvalActionCoords.isTopLevel:Boolean get() ="/"!in name
Copy file name to clipboardExpand all lines: action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/generation/ClassNaming.kt
Copy file name to clipboardExpand all lines: action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/generation/Generation.kt
Copy file name to clipboardExpand all lines: action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/metadata/MetadataReading.kt
Copy file name to clipboardExpand all lines: action-binding-generator/src/main/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/utils/TextUtils.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ internal fun String.toPascalCase(): String {
7
7
val normalizedString =if (hasOnlyUppercases) lowercase() elsethis
8
8
return normalizedString
9
9
.replace("+", "-plus-")
10
-
.split("-", "_", "", ".", "/")
10
+
.split("-", "_", "", ".", "/", "__")
11
11
.joinToString("") {
12
12
it.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }
Copy file name to clipboardExpand all lines: action-binding-generator/src/test/kotlin/io/github/typesafegithub/workflows/actionbindinggenerator/generation/ClassNamingTest.kt
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,9 @@ class ClassNamingTest :
9
9
context("buildActionClassName") {
10
10
listOf(
11
11
ActionCoords("irrelevant", "some-action-name", "v2") to "SomeActionName",
12
-
ActionCoords("irrelevant", "some-action-name/subaction", "v2") to "SomeActionNameSubaction",
13
-
ActionCoords("irrelevant", "some-action-name/foo/bar/baz", "v2") to "SomeActionNameFooBarBaz",
12
+
ActionCoords("irrelevant", "some-action-name__subaction", "v2") to "SomeActionNameSubaction",
13
+
ActionCoords("irrelevant", "some-action-name__foo__bar__baz", "v2") to "SomeActionNameFooBarBaz",
14
+
ActionCoords("irrelevant", "some-action-name__foo__bar__baz___major", "v2") to "SomeActionNameFooBarBaz",
14
15
).forEach { (input, output) ->
15
16
test("should get '$input' and produce '$output'") {
0 commit comments