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.
- 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.
- File analysis: Danger Kotlin provides the list of created, modified, and deleted files in the PR.
- 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/...
becomesapp:feature:login
). - Report generation: A report is generated and posted as a comment on the PR.
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
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.
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" }
}
}
}
- GitHub: Fully supported via
githubModuleReport()
. - GitLab / Bitbucket: Not done yet, but planned for the future and welcome to contribution.
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.
This project is licensed under the MIT License. See the LICENSE file for details.