Dagger
Search

commitlint

commit policy using commitlint.

Installation

dagger install github.com/MacroPower/x/toolchains/commitlint@982edca5fe6b24204d1467a9edadd22c97e35d9f

Entrypoint

Return Type
Commitlint !
Arguments
NameTypeDefault ValueDescription
imageString -Prebuilt container image with commitlint on its entrypoint. When empty, a node container with commitlint installed is built in-module.
cacheNamespaceString -Namespace prefix for the npm cache volume. Override to avoid collisions when multiple projects share an engine.
Example
dagger -m github.com/MacroPower/x/toolchains/commitlint@982edca5fe6b24204d1467a9edadd22c97e35d9f call \
func (m *MyModule) Example() *dagger.Commitlint  {
	return dag.
			Commitlint()
}
@function
def example() -> dagger.Commitlint:
	return (
		dag.commitlint()
	)
@func()
example(): Commitlint {
	return dag
		.commitlint()
}

Types

Commitlint 🔗

Commitlint validates commit messages against a project's conventional commit policy. Create instances with [New].

image() 🔗

Image, when set, is a prebuilt container image with commitlint on its entrypoint. When empty, a node container with commitlint installed is built in-module.

Return Type
String !
Example
dagger -m github.com/MacroPower/x/toolchains/commitlint@982edca5fe6b24204d1467a9edadd22c97e35d9f call \
 image
func (m *MyModule) Example(ctx context.Context) string  {
	return dag.
			Commitlint().
			Image(ctx)
}
@function
async def example() -> str:
	return await (
		dag.commitlint()
		.image()
	)
@func()
async example(): Promise<string> {
	return dag
		.commitlint()
		.image()
}

lint() 🔗

Lint validates commit messages against the project’s commitlint configuration.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-Project source directory containing the commitlint config.
msgFileFile -Commit message file to validate (e.g. .git/COMMIT_EDITMSG).
args[String ! ] -Arguments to pass to commitlint.
Example
dagger -m github.com/MacroPower/x/toolchains/commitlint@982edca5fe6b24204d1467a9edadd22c97e35d9f call \
 lint --source DIR_PATH
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory)   {
	return dag.
			Commitlint().
			Lint(ctx, source)
}
@function
async def example(source: dagger.Directory) -> None:
	return await (
		dag.commitlint()
		.lint(source)
	)
@func()
async example(source: Directory): Promise<void> {
	return dag
		.commitlint()
		.lint(source)
}