Skip to content

Work in Progress – A Danger Kotlin plugin that provides clear and beautiful module insights for Pull Requests.

License

Notifications You must be signed in to change notification settings

SebVay/Multi-Module-Report

Multi Modules Report

MIT License Jacoco GitHub branch check runs

Generate beautiful and attractive, modules report on your Pull Requests using Github Actions or Danger Kotlin.

Warning

It is still under active development and is not yet published.

Example Output

Here's an example of the report generated by this library Capture d'écran 2025-08-21 221936

Features

  • Module-centric view of changes: Understand the impact of a PR at a glance.
  • Host-friendly reports: Generates clean Markdown/HTML tables for GitHub (and more hosts to come).
  • Customizable:
    • Add custom titles and footers.
    • Toggle file links, circle indicators, and line indicators.
    • Filter or rename modules using an interceptor.
  • Easy to integrate: Simple, type-safe Kotlin DSL for configuration.

How it works

  1. File analysis: Danger Kotlin provides the list of created, modified, and deleted files in the PR.
  2. Module grouping: Files are grouped into modules based on their path. The default convention uses the path up to /src/ as the module name (e.g., app/feature/login/src/main/... becomes app:feature:login).
  3. Report generation: A report is generated and posted as a comment on the PR.

Installation & Run

With Danger Kotlin

This library can be used in any environment that runs Danger Kotlin: Set up Danger Kotlin: Follow the instructions on the Danger Kotlin website to set up Danger in your CI environment.

This library will be published on Maven Central. To use it, add the following to your Dangerfile.df.kts:

@file:DependsOn("com.sebastmar:multi-module-report-danger:<latest-version>")

import com.sebastmar.module.report.github.githubModuleReport
import systems.danger.kotlin.danger

danger(args) {
    githubModuleReport()
}

Replace <latest-version> with the latest version from Maven Central

With Github Action

Currently, the primary way to integrate this library is by using the @file:DependsOn annotation in your Dangerfile.df.kts. However, a GitHub Action is planned for the near future to provide a more seamless integration experience.

Configuration

You can customize the report using the githubModuleReport DSL:

import com.sebastmar.module.report.configuration.ModulesInterceptor
import com.sebastmar.multi.module.report.danger.githubModuleReport

danger(args) {
    githubModuleReport {

        reportStrings {
            // Add a title to the report (default)
            topSection = "# Updated Modules"

            // Add a footer to the report (default)
            bottomSection = "_Generated by [multi-module-report-danger](https://github.com/SebVay/Multi-Module-Report)_"            
        }

        // Add links to each file's diff (default)
        linkifyFiles = true

        // Show 🟢/🟡/🔴 with file names (default)
        showCircleIndicators = true

        // Show (+/-) totals in headers (default)
        showLineIndicators = true

        // Intercept the modules and modify them before being displayed on the UI (default: NoOpModulesInterceptor)
        modulesInterceptor { modules ->
            modules.filterNot { it.name == "domain" }
        }
    }
}

Host Support

  • GitHub: Fully supported via githubModuleReport().
  • GitLab / Bitbucket: Not done yet, but planned for the future and welcome to contribution.

Contributing

Contributions are welcome! The project has been developed in order to add new hosts (such as Bitbucket / Gitlab) or features seamlessly.

Please see the Contributing Guidelines and Code of Conduct for more information.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Work in Progress – A Danger Kotlin plugin that provides clear and beautiful module insights for Pull Requests.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published