This is a plugin for danger-kotlin that checks various Ackee conventions like if commit messages align with recommendations specified e.g. here, if commits contain ticket references, etc.
Although this plugin is open for general use, it’s primarily designed as an internal tool to help us share Danger conventions checking logic across our Ackee projects. Because of that, conventions are intentionally not exposed to public contracts as we might change them anytime to suit our internal workflows. Although this plugin is probably not suitable for third-party use, it can still be used as a reference for implementing similar conventions in your own Danger files.
Put
@file:DependsOn("io.github.ackeecz:danger-kotlin-ackee-conventions:x.y.z")to the top of your Dangerfile
There is a single method AckeeConventionsPlugin.check that will perform validations on the merge request.
fun DangerDSL.checkConventions() {
onGitLab {
AckeeConventionsPlugin.check(
data = MergeRequestData(
title = mergeRequest.title,
description = mergeRequest.description,
createdFiles = git.createdFiles,
modifiedFiles = git.modifiedFiles,
commits = git.commits.map { Commit(message = it.message, sha = it.sha) },
),
)
}
}