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

feat: show some stats after a correct submission #30

Merged
merged 1 commit into from
Jul 12, 2022
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
14 changes: 13 additions & 1 deletion plugin/src/io/kipp/mill/github/dependency/graph/Github.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,19 @@ object Github {
)

if (result.is2xx) {
ctx.log.info("Correctly submitted your snapshot to GitHub!")
val manifestModules = snapshot.manifests.size
val totalDependencies =
snapshot.manifests.values.foldLeft(0) { (total, manifest) =>
total + manifest.resolved.size
}

ctx.log.info(s"""Correctly submitted your snapshot to GitHub!
|
|Here are some fun stats!
|
|We submitted dependencies for ${manifestModules} modules.
|This was a total of ${totalDependencies} dependencies.
|""")
} else if (result.statusCode == 404) {
val msg =
"""Encountered a 404, make sure you have "Dependency Graph" enabled under "Settings -> Code Security and analysis""""
Expand Down