git-cliff
This module uses a git reference as a source directory to scan for changesand create a changelog or bump a version. A cliff.toml can be used for additional
customization if found in the working directory where GitCliff is being ran.
Installation
dagger install github.com/act3-ai/dagger/git-cliff@484bed8dba92492e2c9e137495bf610b76709e55Entrypoint
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gitRef | GitRef ! | - | Git repository source. |
| gitCliffVersion | String | "latest" | Version of git-cliff image. |
| workingDir | String | - | No description provided |
| githubToken | Secret | - | private token to use when authenticating with a private github instance set in cliff.toml See: https://git-cliff.org/docs/integration/github |
| gitlabToken | Secret | - | private token to use when authenticating with a private gitlab instance set in cliff.toml See: https://git-cliff.org/docs/integration/gitlab |
| giteaToken | Secret | - | private token to use when authenticating with a private gitea instance set in cliff.toml See: https://git-cliff.org/docs/integration/gitea |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@484bed8dba92492e2c9e137495bf610b76709e55 call \
func (m *MyModule) Example(gitRef *dagger.GitRef) *dagger.GitCliff {
return dag.
GitCliff(gitRef)
}@function
def example(git_ref: dagger.GitRef, ) -> dagger.GitCliff:
return (
dag.git_cliff(git_ref)
)@func()
example(gitRef: GitRef, ): GitCliff {
return dag
.gitCliff(gitRef)
}Types
GitCliff 🔗
container() 🔗
Returns a git-cliff container with optionally mounted secret variables for private gitlab, github, or gitea tokens
Return Type
Container ! Example
dagger -m github.com/act3-ai/dagger/git-cliff@484bed8dba92492e2c9e137495bf610b76709e55 call \
containerfunc (m *MyModule) Example(gitRef *dagger.GitRef) *dagger.Container {
return dag.
GitCliff(gitRef).
Container()
}@function
def example(git_ref: dagger.GitRef, ) -> dagger.Container:
return (
dag.git_cliff(git_ref)
.container()
)@func()
example(gitRef: GitRef, ): Container {
return dag
.gitCliff(gitRef)
.container()
}changelog() 🔗
generate a changelog file with unreleased changes and bumps the tag if tag is not provided If file already exists, it will prepend to the existing changelog instead of creating a new one.
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| changelog | String | "CHANGELOG.md" | file path to output or prepend generated changelog. |
| tag | String | - | tag to generate changelog for |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@484bed8dba92492e2c9e137495bf610b76709e55 call \
changelogfunc (m *MyModule) Example(gitRef *dagger.GitRef) *dagger.File {
return dag.
GitCliff(gitRef).
Changelog()
}@function
def example(git_ref: dagger.GitRef, ) -> dagger.File:
return (
dag.git_cliff(git_ref)
.changelog()
)@func()
example(gitRef: GitRef, ): File {
return dag
.gitCliff(gitRef)
.changelog()
}releaseNotes() 🔗
generate release notes file with unreleased changes and bumps the tag if tag is not provided
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| notes | String | "releasenotes.md" | file path to output release notes. |
| tag | String | - | tag to generate changelog for |
| extraNotes | String | - | append additional provided release notes |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@484bed8dba92492e2c9e137495bf610b76709e55 call \
release-notesfunc (m *MyModule) Example(gitRef *dagger.GitRef) *dagger.File {
return dag.
GitCliff(gitRef).
ReleaseNotes()
}@function
def example(git_ref: dagger.GitRef, ) -> dagger.File:
return (
dag.git_cliff(git_ref)
.release_notes()
)@func()
example(gitRef: GitRef, ): File {
return dag
.gitCliff(gitRef)
.releaseNotes()
}bumpedVersion() 🔗
Prints a bumped tag for unreleased changes.
Return Type
String ! Example
dagger -m github.com/act3-ai/dagger/git-cliff@484bed8dba92492e2c9e137495bf610b76709e55 call \
bumped-versionfunc (m *MyModule) Example(ctx context.Context, gitRef *dagger.GitRef) string {
return dag.
GitCliff(gitRef).
BumpedVersion(ctx)
}@function
async def example(git_ref: dagger.GitRef, ) -> str:
return await (
dag.git_cliff(git_ref)
.bumped_version()
)@func()
async example(gitRef: GitRef, ): Promise<string> {
return dag
.gitCliff(gitRef)
.bumpedVersion()
}