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

Breaking Model Changes - Report Metadata and Totals #39

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -115,7 +115,6 @@ object InvertJsReportUtils {
statMetadata.key to StatTotalAndMetadata(
metadata = statMetadata,
total = totalCount,
totalByModule = totalByModule,
totalByOwner = ownerToTotalCount
)
}.toMap()
Original file line number Diff line number Diff line change
@@ -52,14 +52,13 @@ object ProjectMetadataCollector {

return MetadataJsReportModel(
currentTime = time.epochSecond,
currentTimeStr = formatter.format(time),
currentTimezoneId = timeZoneId,
currentTimeFormatted = formatter.format(time),
timezoneId = timeZoneId,
latestCommitTime = latestCommitTimestamp,
latestCommitTimeFormatted = formatter.format(Instant.ofEpochSecond(latestCommitTimestamp)),
latestCommitGitSha = currentBranchHash,
branchName = currentBranch,
tagName = currentTag,
latestCommitSha = currentBranchHash,
remoteRepoGit = remoteGitRepoUrl,
remoteRepoUrl = remoteRepoUrl,
artifactRepositories = repoUrls,
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@ data class CollectedStatTotalsJsReportModel(
data class StatTotalAndMetadata(
val metadata: StatMetadata,
val total: Int,
val totalByModule: Map<ModulePath, Int>,
val totalByOwner: Map<OwnerName, Int>,
)

Original file line number Diff line number Diff line change
@@ -10,17 +10,16 @@ import kotlinx.serialization.Serializable
*/
@Serializable
data class MetadataJsReportModel(
val currentTime: Long,
val currentTimeStr: String,
val currentTimezoneId: String,
val latestCommitSha: GitSha,
val latestCommitTime: Long,
val latestCommitTimeFormatted: String,
val latestCommitGitSha: GitSha?,
val branchName: GitBranch?,
val tagName: GitTag?,
val remoteRepoGit: String,
val remoteRepoUrl: String,
val artifactRepositories: List<String>,
val buildSystem: BuildSystem,
val artifactRepositories: List<String>,
val branchName: GitBranch?,
val buildSystem: BuildSystem,
val currentTime: Long,
val currentTimeFormatted: String,
val latestCommitGitSha: GitSha,
val latestCommitTime: Long,
val latestCommitTimeFormatted: String,
val tagName: GitTag?,
val timezoneId: String,
val remoteRepoGit: String,
val remoteRepoUrl: String,
)
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ object FormattingUtils {
} ${dateTime.dayOfMonth}, ${dateTime.year} at " +
"${dateTime.hour.toString().padStart(2, '0')}:${
dateTime.minute.toString().padStart(2, '0')
}:${dateTime.second.toString().padStart(2, '0')} ($currentTimezoneId)"
}:${dateTime.second.toString().padStart(2, '0')} ($timezoneId)"

return formattedDate
}
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ fun LeftNavigationComposable(
}
}
Br()
metadata.latestCommitSha.let { currentBranchHash ->
metadata.latestCommitGitSha.let { currentBranchHash ->
Text("Commit ")
A(href = metadata.remoteRepoUrl + "/tree/${currentBranchHash}", attrs = { target(Blank) }) {
Text(currentBranchHash.substring(0, 7))