git-cliff
GitCliff is a highly customizable changelog generator.
Installation
dagger install github.com/act3-ai/dagger/git-cliff@v0.2.1Entrypoint
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| gitref | GitRef ! | - | Git repository source. |
| container | Container | - | Custom container to use as a base container. Must have 'git-cliff' available on PATH. |
| version | String | "latest" | Version (image tag) to use as a git-cliff binary source. |
| config | File | - | Configuration file. |
| netrc | Secret | - | Mount netrc credentials for a private git repository. |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
func (m *MyModule) Example(gitref *dagger.GitRef) *dagger.GitCliff {
return dag.
GitCliff(gitref)
}@function
def example(gitref: dagger.GitRef, ) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
)@func()
example(gitref: GitRef, ): GitCliff {
return dag
.gitCliff(gitref)
}Types
GitCliff 🔗
container() 🔗
Return Type
Container ! Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
containerfunc (m *MyModule) Example(gitref *dagger.GitRef) *dagger.Container {
return dag.
GitCliff(gitref).
Container()
}@function
def example(gitref: dagger.GitRef, ) -> dagger.Container:
return (
dag.git_cliff(gitref)
.container()
)@func()
example(gitref: GitRef, ): Container {
return dag
.gitCliff(gitref)
.container()
}withPrivateGitlabHost() 🔗
WithPrivateGitlabHost provides conveneince for using git-cliff with a private GitLab host. Altenatively, use WithEnvVariable and WithSecretVariable as needed.
Sets GITLAB_API_URL, GITLAB_REPO, and GITLAB_TOKEN.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| apiUrl | String ! | - | API URL, typically https://<host>/api/v4 |
| repo | String ! | - | Repository |
| token | Secret ! | - | Access token |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-private-gitlab-host --api-url string --repo string --token env:MYSECRETfunc (m *MyModule) Example(gitref *dagger.GitRef, apiUrl string, repo string, token *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithPrivateGitlabHost(apiUrl, repo, token)
}@function
def example(gitref: dagger.GitRef, api_url: str, repo: str, token: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_private_gitlab_host(api_url, repo, token)
)@func()
example(gitref: GitRef, apiUrl: string, repo: string, token: Secret): GitCliff {
return dag
.gitCliff(gitref)
.withPrivateGitlabHost(apiUrl, repo, token)
}withPrivateGiteaHost() 🔗
WithPrivateGiteaHost provides conveneince for using git-cliff with a private Gitea host.Altenatively, use WithEnvVariable and WithSecretVariable as needed.
Sets GITEA_API_URL, GITEA_REPO, and GITEA_TOKEN.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| apiUrl | String ! | - | API URL, typically https://<host>/api/v4 |
| repo | String ! | - | Repository |
| token | Secret ! | - | Access token |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-private-gitea-host --api-url string --repo string --token env:MYSECRETfunc (m *MyModule) Example(gitref *dagger.GitRef, apiUrl string, repo string, token *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithPrivateGiteaHost(apiUrl, repo, token)
}@function
def example(gitref: dagger.GitRef, api_url: str, repo: str, token: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_private_gitea_host(api_url, repo, token)
)@func()
example(gitref: GitRef, apiUrl: string, repo: string, token: Secret): GitCliff {
return dag
.gitCliff(gitref)
.withPrivateGiteaHost(apiUrl, repo, token)
}withEnvVariable() 🔗
WithEnvVariable adds an environment variable to the git-cliff container.
This is useful for reusability and readability by not breaking the calling chain.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | The name of the environment variable (e.g., "HOST"). |
| value | String ! | - | The value of the environment variable (e.g., "localhost"). |
| expand | Boolean | - | Replace `${VAR}` or $VAR in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH"). |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-env-variable --name string --value stringfunc (m *MyModule) Example(gitref *dagger.GitRef, name string, value string) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithEnvVariable(name, value)
}@function
def example(gitref: dagger.GitRef, name: str, value: str) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_env_variable(name, value)
)@func()
example(gitref: GitRef, name: string, value: string): GitCliff {
return dag
.gitCliff(gitref)
.withEnvVariable(name, value)
}withSecretVariable() 🔗
WithSecretVariable adds an env variable containing a secret to the git-cliff container.
This is useful for reusability and readability by not breaking the calling chain.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | The name of the environment variable containing a secret (e.g., "PASSWORD"). |
| secret | Secret ! | - | The value of the environment variable containing a secret. |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-secret-variable --name string --secret env:MYSECRETfunc (m *MyModule) Example(gitref *dagger.GitRef, name string, secret *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithSecretVariable(name, secret)
}@function
def example(gitref: dagger.GitRef, name: str, secret: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_secret_variable(name, secret)
)@func()
example(gitref: GitRef, name: string, secret: Secret): GitCliff {
return dag
.gitCliff(gitref)
.withSecretVariable(name, secret)
}run() 🔗
Run git-cliff with all options previously provided.
Run MAY be used as a “catch-all” in case functions are not implemented.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| args | [String ! ] | - | arguments and flags, without `git-cliff` |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
runfunc (m *MyModule) Example(gitref *dagger.GitRef) *dagger.Container {
return dag.
GitCliff(gitref).
Run()
}@function
def example(gitref: dagger.GitRef, ) -> dagger.Container:
return (
dag.git_cliff(gitref)
.run()
)@func()
example(gitref: GitRef, ): Container {
return dag
.gitCliff(gitref)
.run()
}bumpedVersion() 🔗
Prints bumped version for unreleased changes.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| args | [String ! ] | - | additional arguments and flags for git-cliff |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
bumped-versionfunc (m *MyModule) Example(ctx context.Context, gitref *dagger.GitRef) string {
return dag.
GitCliff(gitref).
BumpedVersion(ctx)
}@function
async def example(gitref: dagger.GitRef, ) -> str:
return await (
dag.git_cliff(gitref)
.bumped_version()
)@func()
async example(gitref: GitRef, ): Promise<string> {
return dag
.gitCliff(gitref)
.bumpedVersion()
}withTag() 🔗
Generate a changelog for a specific version, ignoring configured method of version bumping.
e.g. git-cliff --tag <version>.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | - | Specific tag |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-tag --version stringfunc (m *MyModule) Example(gitref *dagger.GitRef, version string) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithTag(version)
}@function
def example(gitref: dagger.GitRef, version: str) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_tag(version)
)@func()
example(gitref: GitRef, version: string): GitCliff {
return dag
.gitCliff(gitref)
.withTag(version)
}withGithubToken() 🔗
Sets the GitHub API token.
e.g. GITHUB_TOKEN=<token> git-cliff.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| token | Secret ! | - | GitHub API token. |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-github-token --token env:MYSECRETfunc (m *MyModule) Example(gitref *dagger.GitRef, token *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithGithubToken(token)
}@function
def example(gitref: dagger.GitRef, token: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_github_token(token)
)@func()
example(gitref: GitRef, token: Secret): GitCliff {
return dag
.gitCliff(gitref)
.withGithubToken(token)
}withGitlabToken() 🔗
Sets the GitLab API token.
e.g. GITLAB_TOKEN=<token> git-cliff.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| token | Secret ! | - | GitLab API token. |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-gitlab-token --token env:MYSECRETfunc (m *MyModule) Example(gitref *dagger.GitRef, token *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithGitlabToken(token)
}@function
def example(gitref: dagger.GitRef, token: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_gitlab_token(token)
)@func()
example(gitref: GitRef, token: Secret): GitCliff {
return dag
.gitCliff(gitref)
.withGitlabToken(token)
}withGiteaToken() 🔗
Sets the Gitea API token.
e.g. GITEA_TOKEN=<token> git-cliff.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| token | Secret ! | - | Gitea API token. |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-gitea-token --token env:MYSECRETfunc (m *MyModule) Example(gitref *dagger.GitRef, token *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithGiteaToken(token)
}@function
def example(gitref: dagger.GitRef, token: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_gitea_token(token)
)@func()
example(gitref: GitRef, token: Secret): GitCliff {
return dag
.gitCliff(gitref)
.withGiteaToken(token)
}withBumpedVersion() 🔗
Prints bumped version for unreleased changes.
e.g. git-cliff --bumped-version.
Return Type
GitCliff ! Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-bumped-versionfunc (m *MyModule) Example(gitref *dagger.GitRef) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithBumpedVersion()
}@function
def example(gitref: dagger.GitRef, ) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_bumped_version()
)@func()
example(gitref: GitRef, ): GitCliff {
return dag
.gitCliff(gitref)
.withBumpedVersion()
}withBump() 🔗
Bump the version for unreleased changes. Optionally with specified bump method/type.
e.g. git-cliff --bump.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| method | String | - | bump method/type. Supported values: 'major', 'minor', and 'patch'. |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-bumpfunc (m *MyModule) Example(gitref *dagger.GitRef) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithBump()
}@function
def example(gitref: dagger.GitRef, ) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_bump()
)@func()
example(gitref: GitRef, ): GitCliff {
return dag
.gitCliff(gitref)
.withBump()
}withTagPattern() 🔗
Sets the regex for matching git tags.
e.g. git-cliff --tag-pattern.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| pattern | [String ! ] ! | - | glob pattern |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-tag-pattern --pattern string1 --pattern string2func (m *MyModule) Example(gitref *dagger.GitRef, pattern []string) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithTagPattern(pattern)
}@function
def example(gitref: dagger.GitRef, pattern: List[str]) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_tag_pattern(pattern)
)@func()
example(gitref: GitRef, pattern: string[]): GitCliff {
return dag
.gitCliff(gitref)
.withTagPattern(pattern)
}withLatest() 🔗
Processes the commits starting from the latest tag.
e.g. git-cliff --latest.
Return Type
GitCliff ! Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-latestfunc (m *MyModule) Example(gitref *dagger.GitRef) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithLatest()
}@function
def example(gitref: dagger.GitRef, ) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_latest()
)@func()
example(gitref: GitRef, ): GitCliff {
return dag
.gitCliff(gitref)
.withLatest()
}withCurrent() 🔗
Processes the commits that belog to the current tag.
e.g. git-cliff --current
Return Type
GitCliff ! Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-currentfunc (m *MyModule) Example(gitref *dagger.GitRef) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithCurrent()
}@function
def example(gitref: dagger.GitRef, ) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_current()
)@func()
example(gitref: GitRef, ): GitCliff {
return dag
.gitCliff(gitref)
.withCurrent()
}withUnreleased() 🔗
Processes the commits that do not belog to a tag.
e.g. git-cliff --unreleased.
Return Type
GitCliff ! Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-unreleasedfunc (m *MyModule) Example(gitref *dagger.GitRef) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithUnreleased()
}@function
def example(gitref: dagger.GitRef, ) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_unreleased()
)@func()
example(gitref: GitRef, ): GitCliff {
return dag
.gitCliff(gitref)
.withUnreleased()
}withTopoOrder() 🔗
Sorts the tags topologically.
e.g. git-cliff --topo-order.
Return Type
GitCliff ! Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-topo-orderfunc (m *MyModule) Example(gitref *dagger.GitRef) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithTopoOrder()
}@function
def example(gitref: dagger.GitRef, ) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_topo_order()
)@func()
example(gitref: GitRef, ): GitCliff {
return dag
.gitCliff(gitref)
.withTopoOrder()
}withRepository() 🔗
Sets the git repository.
e.g. git-cliff --repository <repo>....
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| repo | [String ! ] ! | - | git repository (one or more) |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-repository --repo string1 --repo string2func (m *MyModule) Example(gitref *dagger.GitRef, repo []string) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithRepository(repo)
}@function
def example(gitref: dagger.GitRef, repo: List[str]) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_repository(repo)
)@func()
example(gitref: GitRef, repo: string[]): GitCliff {
return dag
.gitCliff(gitref)
.withRepository(repo)
}withIncludePath() 🔗
Sets the path to include related commits.
e.g. git-cliff --include-pattern <pattern>....
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| pattern | [String ! ] ! | - | glob pattern or direct path (one or more) |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-include-path --pattern string1 --pattern string2func (m *MyModule) Example(gitref *dagger.GitRef, pattern []string) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithIncludePath(pattern)
}@function
def example(gitref: dagger.GitRef, pattern: List[str]) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_include_path(pattern)
)@func()
example(gitref: GitRef, pattern: string[]): GitCliff {
return dag
.gitCliff(gitref)
.withIncludePath(pattern)
}withExcludePath() 🔗
Sets the path to exclude related commits.
e.g. git-cliff --include-pattern <pattern>....
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| pattern | [String ! ] ! | - | glob pattern or direct path (one or more) |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-exclude-path --pattern string1 --pattern string2func (m *MyModule) Example(gitref *dagger.GitRef, pattern []string) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithExcludePath(pattern)
}@function
def example(gitref: dagger.GitRef, pattern: List[str]) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_exclude_path(pattern)
)@func()
example(gitref: GitRef, pattern: string[]): GitCliff {
return dag
.gitCliff(gitref)
.withExcludePath(pattern)
}withSkipCommit() 🔗
Sets comits that will be skipped in the changelog.
e.g. git-cliff --skip-commit <sha1>....
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| sha1 | [String ! ] ! | - | Commits (one or more) |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-skip-commit --sha-1 string1 --sha-1 string2func (m *MyModule) Example(gitref *dagger.GitRef, sha1 []string) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithSkipCommit(sha1)
}@function
def example(gitref: dagger.GitRef, sha1: List[str]) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_skip_commit(sha1)
)@func()
example(gitref: GitRef, sha1: string[]): GitCliff {
return dag
.gitCliff(gitref)
.withSkipCommit(sha1)
}withPrepend() 🔗
Prepends entries to the given changelog file.
e.g. git-cliff --prepend <changelog>.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| changelog | String ! | - | Path to changelog, relative to source git directory |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-prepend --changelog stringfunc (m *MyModule) Example(gitref *dagger.GitRef, changelog string) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithPrepend(changelog)
}@function
def example(gitref: dagger.GitRef, changelog: str) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_prepend(changelog)
)@func()
example(gitref: GitRef, changelog: string): GitCliff {
return dag
.gitCliff(gitref)
.withPrepend(changelog)
}withOutput() 🔗
Writes output to the fiven file.
e.g. git-cliff --output <path>.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| path | String ! | - | Write output to file, relative to source git directory. |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-output --path stringfunc (m *MyModule) Example(gitref *dagger.GitRef, path string) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithOutput(path)
}@function
def example(gitref: dagger.GitRef, path: str) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_output(path)
)@func()
example(gitref: GitRef, path: string): GitCliff {
return dag
.gitCliff(gitref)
.withOutput(path)
}withStrip() 🔗
Strips the given parts from the changelog.
e.g. git-cliff --strip <part>.
Return Type
GitCliff !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| part | String ! | - | Part of changelog to strip. Supported values: header, footer, all. |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@324669f01272fc59c6cf74f1e2b68898bb5b220d call \
with-strip --part stringfunc (m *MyModule) Example(gitref *dagger.GitRef, part string) *dagger.GitCliff {
return dag.
GitCliff(gitref).
WithStrip(part)
}@function
def example(gitref: dagger.GitRef, part: str) -> dagger.GitCliff:
return (
dag.git_cliff(gitref)
.with_strip(part)
)@func()
example(gitref: GitRef, part: string): GitCliff {
return dag
.gitCliff(gitref)
.withStrip(part)
}