Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Mixpanel module API & implementation #2107

Merged
merged 9 commits into from
Aug 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert unneeded change
jan-goral committed Aug 5, 2021
commit 9162a977f4d2220bbabe1fad85b67d4e5e3f857e
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ package ftl.adapter.google
import com.google.testing.model.FileReference
import com.google.testing.model.TestExecution
import com.google.testing.model.TestMatrix
import flank.common.toJSONObject
import ftl.api.TestMatrix.Data
import ftl.api.TestMatrix.Outcome
import ftl.api.TestMatrix.SuiteOverview
@@ -17,7 +18,6 @@ import ftl.util.getGcsRootBucket
import ftl.util.timeoutToSeconds
import ftl.util.webLink
import ftl.util.webLinkWithoutExecutionDetails
import org.json.JSONObject

fun TestMatrix.toApiModel(identity: ftl.api.TestMatrix.Identity? = null) = Data(
projectId = projectId.orEmpty(),
@@ -95,7 +95,7 @@ private fun TestMatrix.extractFileName(fileName: TestFilesPathWrapper.() -> Stri
iosTestLoop
)
.firstOrNull { it != null }
?.let(::JSONObject)
?.toJSONObject()
?.let { prettyPrint.fromJson(it.toString(), TestFilesPathWrapper::class.java).fileName() }
?.substringAfterLast('/')
}