gitDiffFiles
This module allows you to get staged files, files from the previous commit,or files changed between two specific commits within your Dagger pipelines.
Installation
dagger install github.com/StaytunedLLP/daggerverse/git-diff@v0.1.32
Entrypoint
Return Type
GitDiffFiles
Example
dagger -m github.com/StaytunedLLP/daggerverse/git-diff@f3bd722d9454b351e81c8bfecb2f8ea47de12469 call \
func (m *myModule) example() *GitDiffFiles {
return dag.
GitDiffFiles()
}
@function
def example() -> dag.GitDiffFiles:
return (
dag.git_diff_files()
)
@func()
example(): GitDiffFiles {
return dag
.gitDiffFiles()
}
Types
GitDiffFiles 🔗
getStagedFiles() 🔗
Retrieves an array of files that are staged for commit.
Return Type
[String ! ] !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | - The source directory to check for staged files. |
Example
dagger -m github.com/StaytunedLLP/daggerverse/git-diff@f3bd722d9454b351e81c8bfecb2f8ea47de12469 call \
get-staged-files --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) []string {
return dag.
GitDiffFiles().
GetStagedFiles(ctx, source)
}
@function
async def example(source: dagger.Directory) -> List[str]:
return await (
dag.git_diff_files()
.get_staged_files(source)
)
@func()
async example(source: Directory): Promise<string[]> {
return dag
.gitDiffFiles()
.getStagedFiles(source)
}
getPreviousCommitFiles() 🔗
Retrieves an array of files from the previous commit.
Return Type
[String ! ] !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | - The source directory to check for files in the previous commit. |
Example
dagger -m github.com/StaytunedLLP/daggerverse/git-diff@f3bd722d9454b351e81c8bfecb2f8ea47de12469 call \
get-previous-commit-files --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) []string {
return dag.
GitDiffFiles().
GetPreviousCommitFiles(ctx, source)
}
@function
async def example(source: dagger.Directory) -> List[str]:
return await (
dag.git_diff_files()
.get_previous_commit_files(source)
)
@func()
async example(source: Directory): Promise<string[]> {
return dag
.gitDiffFiles()
.getPreviousCommitFiles(source)
}
getFilesBetweenCommits() 🔗
Retrieves an array of files that have changed between two commits.
Return Type
[String ! ] !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | - The source directory to check for files in the commit range. |
commitRange | String ! | - | - A string specifying the range of commits. |
Example
dagger -m github.com/StaytunedLLP/daggerverse/git-diff@f3bd722d9454b351e81c8bfecb2f8ea47de12469 call \
get-files-between-commits --source DIR_PATH --commit-range string
func (m *myModule) example(ctx context.Context, source *Directory, commitRange string) []string {
return dag.
GitDiffFiles().
GetFilesBetweenCommits(ctx, source, commitRange)
}
@function
async def example(source: dagger.Directory, commit_range: str) -> List[str]:
return await (
dag.git_diff_files()
.get_files_between_commits(source, commit_range)
)
@func()
async example(source: Directory, commitRange: string): Promise<string[]> {
return dag
.gitDiffFiles()
.getFilesBetweenCommits(source, commitRange)
}