git-cliff
GitCliff is a highly customizable changelog generator.
Installation
dagger install github.com/act3-ai/dagger/git-cliff@6bac99a9d8704e6d59353b7ff848f51c72b0b062
Entrypoint
Return Type
GitCliff !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | Git repository source. |
container | Container | - | Custom container to use as a base container. Must have 'yamllint' 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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH
func (m *MyModule) Example(src *dagger.Directory) *dagger.GitCliff {
return dag.
GitCliff(src)
}
@function
def example(src: dagger.Directory, ) -> dagger.GitCliff:
return (
dag.git_cliff(src)
)
@func()
example(src: Directory, ): GitCliff {
return dag
.gitCliff(src)
}
Types
GitCliff 🔗
container() 🔗
Return Type
Container !
Example
dagger -m github.com/act3-ai/dagger/git-cliff@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH container
func (m *MyModule) Example(src *dagger.Directory) *dagger.Container {
return dag.
GitCliff(src).
Container()
}
@function
def example(src: dagger.Directory, ) -> dagger.Container:
return (
dag.git_cliff(src)
.container()
)
@func()
example(src: Directory, ): Container {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-private-gitlab-host --api-url string --repo string --token env:MYSECRET
func (m *MyModule) Example(src *dagger.Directory, apiUrl string, repo string, token *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(src).
WithPrivateGitlabHost(apiUrl, repo, token)
}
@function
def example(src: dagger.Directory, api_url: str, repo: str, token: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_private_gitlab_host(api_url, repo, token)
)
@func()
example(src: Directory, apiUrl: string, repo: string, token: Secret): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-private-gitea-host --api-url string --repo string --token env:MYSECRET
func (m *MyModule) Example(src *dagger.Directory, apiUrl string, repo string, token *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(src).
WithPrivateGiteaHost(apiUrl, repo, token)
}
@function
def example(src: dagger.Directory, api_url: str, repo: str, token: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_private_gitea_host(api_url, repo, token)
)
@func()
example(src: Directory, apiUrl: string, repo: string, token: Secret): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-env-variable --name string --value string
func (m *MyModule) Example(src *dagger.Directory, name string, value string) *dagger.GitCliff {
return dag.
GitCliff(src).
WithEnvVariable(name, value)
}
@function
def example(src: dagger.Directory, name: str, value: str) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_env_variable(name, value)
)
@func()
example(src: Directory, name: string, value: string): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-secret-variable --name string --secret env:MYSECRET
func (m *MyModule) Example(src *dagger.Directory, name string, secret *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(src).
WithSecretVariable(name, secret)
}
@function
def example(src: dagger.Directory, name: str, secret: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_secret_variable(name, secret)
)
@func()
example(src: Directory, name: string, secret: Secret): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH run
func (m *MyModule) Example(src *dagger.Directory) *dagger.Container {
return dag.
GitCliff(src).
Run()
}
@function
def example(src: dagger.Directory, ) -> dagger.Container:
return (
dag.git_cliff(src)
.run()
)
@func()
example(src: Directory, ): Container {
return dag
.gitCliff(src)
.run()
}
bumpedVersion() 🔗
Prints bumped version for unreleased changes.
Return Type
String !
Example
dagger -m github.com/act3-ai/dagger/git-cliff@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH bumped-version
func (m *MyModule) Example(ctx context.Context, src *dagger.Directory) string {
return dag.
GitCliff(src).
BumpedVersion(ctx)
}
@function
async def example(src: dagger.Directory, ) -> str:
return await (
dag.git_cliff(src)
.bumped_version()
)
@func()
async example(src: Directory, ): Promise<string> {
return dag
.gitCliff(src)
.bumpedVersion()
}
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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-github-token --token env:MYSECRET
func (m *MyModule) Example(src *dagger.Directory, token *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(src).
WithGithubToken(token)
}
@function
def example(src: dagger.Directory, token: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_github_token(token)
)
@func()
example(src: Directory, token: Secret): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-gitlab-token --token env:MYSECRET
func (m *MyModule) Example(src *dagger.Directory, token *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(src).
WithGitlabToken(token)
}
@function
def example(src: dagger.Directory, token: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_gitlab_token(token)
)
@func()
example(src: Directory, token: Secret): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-gitea-token --token env:MYSECRET
func (m *MyModule) Example(src *dagger.Directory, token *dagger.Secret) *dagger.GitCliff {
return dag.
GitCliff(src).
WithGiteaToken(token)
}
@function
def example(src: dagger.Directory, token: dagger.Secret) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_gitea_token(token)
)
@func()
example(src: Directory, token: Secret): GitCliff {
return dag
.gitCliff(src)
.withGiteaToken(token)
}
withBump() 🔗
Bump the version for unreleased changes. Optionally with specified version.
e.g. git-cliff --bump
.
Return Type
GitCliff !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | String | - | specified version |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-bump
func (m *MyModule) Example(src *dagger.Directory) *dagger.GitCliff {
return dag.
GitCliff(src).
WithBump()
}
@function
def example(src: dagger.Directory, ) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_bump()
)
@func()
example(src: Directory, ): GitCliff {
return dag
.gitCliff(src)
.withBump()
}
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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-latest
func (m *MyModule) Example(src *dagger.Directory) *dagger.GitCliff {
return dag.
GitCliff(src).
WithLatest()
}
@function
def example(src: dagger.Directory, ) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_latest()
)
@func()
example(src: Directory, ): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-current
func (m *MyModule) Example(src *dagger.Directory) *dagger.GitCliff {
return dag.
GitCliff(src).
WithCurrent()
}
@function
def example(src: dagger.Directory, ) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_current()
)
@func()
example(src: Directory, ): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-unreleased
func (m *MyModule) Example(src *dagger.Directory) *dagger.GitCliff {
return dag.
GitCliff(src).
WithUnreleased()
}
@function
def example(src: dagger.Directory, ) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_unreleased()
)
@func()
example(src: Directory, ): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-topo-order
func (m *MyModule) Example(src *dagger.Directory) *dagger.GitCliff {
return dag.
GitCliff(src).
WithTopoOrder()
}
@function
def example(src: dagger.Directory, ) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_topo_order()
)
@func()
example(src: Directory, ): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-repository --repo string1 --repo string2
func (m *MyModule) Example(src *dagger.Directory, repo []string) *dagger.GitCliff {
return dag.
GitCliff(src).
WithRepository(repo)
}
@function
def example(src: dagger.Directory, repo: List[str]) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_repository(repo)
)
@func()
example(src: Directory, repo: string[]): GitCliff {
return dag
.gitCliff(src)
.withRepository(repo)
}
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 |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-skip-commit --sha-1 string1 --sha-1 string2
func (m *MyModule) Example(src *dagger.Directory, sha1 []string) *dagger.GitCliff {
return dag.
GitCliff(src).
WithSkipCommit(sha1)
}
@function
def example(src: dagger.Directory, sha1: List[str]) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_skip_commit(sha1)
)
@func()
example(src: Directory, sha1: string[]): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-prepend --changelog string
func (m *MyModule) Example(src *dagger.Directory, changelog string) *dagger.GitCliff {
return dag.
GitCliff(src).
WithPrepend(changelog)
}
@function
def example(src: dagger.Directory, changelog: str) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_prepend(changelog)
)
@func()
example(src: Directory, changelog: string): GitCliff {
return dag
.gitCliff(src)
.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@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-output --path string
func (m *MyModule) Example(src *dagger.Directory, path string) *dagger.GitCliff {
return dag.
GitCliff(src).
WithOutput(path)
}
@function
def example(src: dagger.Directory, path: str) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_output(path)
)
@func()
example(src: Directory, path: string): GitCliff {
return dag
.gitCliff(src)
.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. Possible values: header, footer, all. |
Example
dagger -m github.com/act3-ai/dagger/git-cliff@6bac99a9d8704e6d59353b7ff848f51c72b0b062 call \
--src DIR_PATH with-strip --part string
func (m *MyModule) Example(src *dagger.Directory, part string) *dagger.GitCliff {
return dag.
GitCliff(src).
WithStrip(part)
}
@function
def example(src: dagger.Directory, part: str) -> dagger.GitCliff:
return (
dag.git_cliff(src)
.with_strip(part)
)
@func()
example(src: Directory, part: string): GitCliff {
return dag
.gitCliff(src)
.withStrip(part)
}