Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.DevOps.getRepositoryFileDiff
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides details about a specific Repository File Diff resource in Oracle Cloud Infrastructure Devops service.
Gets the line-by-line difference between file on different commits.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRepositoryFileDiff = oci.DevOps.getRepositoryFileDiff({
baseVersion: repositoryFileDiffBaseVersion,
repositoryId: testRepository.id,
targetVersion: repositoryFileDiffTargetVersion,
filePath: repositoryFileDiffFilePath,
isComparisonFromMergeBase: repositoryFileDiffIsComparisonFromMergeBase,
});
import pulumi
import pulumi_oci as oci
test_repository_file_diff = oci.DevOps.get_repository_file_diff(base_version=repository_file_diff_base_version,
repository_id=test_repository["id"],
target_version=repository_file_diff_target_version,
file_path=repository_file_diff_file_path,
is_comparison_from_merge_base=repository_file_diff_is_comparison_from_merge_base)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/DevOps"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := DevOps.GetRepositoryFileDiff(ctx, &devops.GetRepositoryFileDiffArgs{
BaseVersion: repositoryFileDiffBaseVersion,
RepositoryId: testRepository.Id,
TargetVersion: repositoryFileDiffTargetVersion,
FilePath: repositoryFileDiffFilePath,
IsComparisonFromMergeBase: pulumi.BoolRef(repositoryFileDiffIsComparisonFromMergeBase),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testRepositoryFileDiff = Oci.DevOps.GetRepositoryFileDiff.Invoke(new()
{
BaseVersion = repositoryFileDiffBaseVersion,
RepositoryId = testRepository.Id,
TargetVersion = repositoryFileDiffTargetVersion,
FilePath = repositoryFileDiffFilePath,
IsComparisonFromMergeBase = repositoryFileDiffIsComparisonFromMergeBase,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DevOps.DevOpsFunctions;
import com.pulumi.oci.DevOps.inputs.GetRepositoryFileDiffArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var testRepositoryFileDiff = DevOpsFunctions.getRepositoryFileDiff(GetRepositoryFileDiffArgs.builder()
.baseVersion(repositoryFileDiffBaseVersion)
.repositoryId(testRepository.id())
.targetVersion(repositoryFileDiffTargetVersion)
.filePath(repositoryFileDiffFilePath)
.isComparisonFromMergeBase(repositoryFileDiffIsComparisonFromMergeBase)
.build());
}
}
variables:
testRepositoryFileDiff:
fn::invoke:
Function: oci:DevOps:getRepositoryFileDiff
Arguments:
baseVersion: ${repositoryFileDiffBaseVersion}
repositoryId: ${testRepository.id}
targetVersion: ${repositoryFileDiffTargetVersion}
filePath: ${repositoryFileDiffFilePath}
isComparisonFromMergeBase: ${repositoryFileDiffIsComparisonFromMergeBase}
Using getRepositoryFileDiff
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRepositoryFileDiff(args: GetRepositoryFileDiffArgs, opts?: InvokeOptions): Promise<GetRepositoryFileDiffResult>
function getRepositoryFileDiffOutput(args: GetRepositoryFileDiffOutputArgs, opts?: InvokeOptions): Output<GetRepositoryFileDiffResult>
def get_repository_file_diff(base_version: Optional[str] = None,
file_path: Optional[str] = None,
is_comparison_from_merge_base: Optional[bool] = None,
repository_id: Optional[str] = None,
target_version: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRepositoryFileDiffResult
def get_repository_file_diff_output(base_version: Optional[pulumi.Input[str]] = None,
file_path: Optional[pulumi.Input[str]] = None,
is_comparison_from_merge_base: Optional[pulumi.Input[bool]] = None,
repository_id: Optional[pulumi.Input[str]] = None,
target_version: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryFileDiffResult]
func GetRepositoryFileDiff(ctx *Context, args *GetRepositoryFileDiffArgs, opts ...InvokeOption) (*GetRepositoryFileDiffResult, error)
func GetRepositoryFileDiffOutput(ctx *Context, args *GetRepositoryFileDiffOutputArgs, opts ...InvokeOption) GetRepositoryFileDiffResultOutput
> Note: This function is named GetRepositoryFileDiff
in the Go SDK.
public static class GetRepositoryFileDiff
{
public static Task<GetRepositoryFileDiffResult> InvokeAsync(GetRepositoryFileDiffArgs args, InvokeOptions? opts = null)
public static Output<GetRepositoryFileDiffResult> Invoke(GetRepositoryFileDiffInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRepositoryFileDiffResult> getRepositoryFileDiff(GetRepositoryFileDiffArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DevOps/getRepositoryFileDiff:getRepositoryFileDiff
arguments:
# arguments dictionary
The following arguments are supported:
- Base
Version string - The branch to compare changes against.
- File
Path string - A filter to return only commits that affect any of the specified paths.
- Repository
Id string - Unique repository identifier.
- Target
Version string - The branch where changes are coming from.
- Is
Comparison boolFrom Merge Base - Boolean to indicate whether to use merge base or most recent revision.
- Base
Version string - The branch to compare changes against.
- File
Path string - A filter to return only commits that affect any of the specified paths.
- Repository
Id string - Unique repository identifier.
- Target
Version string - The branch where changes are coming from.
- Is
Comparison boolFrom Merge Base - Boolean to indicate whether to use merge base or most recent revision.
- base
Version String - The branch to compare changes against.
- file
Path String - A filter to return only commits that affect any of the specified paths.
- repository
Id String - Unique repository identifier.
- target
Version String - The branch where changes are coming from.
- is
Comparison BooleanFrom Merge Base - Boolean to indicate whether to use merge base or most recent revision.
- base
Version string - The branch to compare changes against.
- file
Path string - A filter to return only commits that affect any of the specified paths.
- repository
Id string - Unique repository identifier.
- target
Version string - The branch where changes are coming from.
- is
Comparison booleanFrom Merge Base - Boolean to indicate whether to use merge base or most recent revision.
- base_
version str - The branch to compare changes against.
- file_
path str - A filter to return only commits that affect any of the specified paths.
- repository_
id str - Unique repository identifier.
- target_
version str - The branch where changes are coming from.
- is_
comparison_ boolfrom_ merge_ base - Boolean to indicate whether to use merge base or most recent revision.
- base
Version String - The branch to compare changes against.
- file
Path String - A filter to return only commits that affect any of the specified paths.
- repository
Id String - Unique repository identifier.
- target
Version String - The branch where changes are coming from.
- is
Comparison BooleanFrom Merge Base - Boolean to indicate whether to use merge base or most recent revision.
getRepositoryFileDiff Result
The following output properties are available:
- Are
Conflicts boolIn File - Indicates whether the changed file contains conflicts.
- Base
Version string - Changes
List<Get
Repository File Diff Change> - List of changed section in the file.
- File
Path string - Id string
- The provider-assigned unique ID for this managed resource.
- Is
Binary bool - Indicates whether the file is binary.
- Is
Large bool - Indicates whether the file is large.
- New
Id string - The ID of the changed object on the target version.
- New
Path string - The path on the target version to the changed object.
- Old
Id string - The ID of the changed object on the base version.
- Old
Path string - The path on the base version to the changed object.
- Repository
Id string - Target
Version string - Is
Comparison boolFrom Merge Base
- Are
Conflicts boolIn File - Indicates whether the changed file contains conflicts.
- Base
Version string - Changes
[]Get
Repository File Diff Change - List of changed section in the file.
- File
Path string - Id string
- The provider-assigned unique ID for this managed resource.
- Is
Binary bool - Indicates whether the file is binary.
- Is
Large bool - Indicates whether the file is large.
- New
Id string - The ID of the changed object on the target version.
- New
Path string - The path on the target version to the changed object.
- Old
Id string - The ID of the changed object on the base version.
- Old
Path string - The path on the base version to the changed object.
- Repository
Id string - Target
Version string - Is
Comparison boolFrom Merge Base
- are
Conflicts BooleanIn File - Indicates whether the changed file contains conflicts.
- base
Version String - changes
List<Get
Repository File Diff Change> - List of changed section in the file.
- file
Path String - id String
- The provider-assigned unique ID for this managed resource.
- is
Binary Boolean - Indicates whether the file is binary.
- is
Large Boolean - Indicates whether the file is large.
- new
Id String - The ID of the changed object on the target version.
- new
Path String - The path on the target version to the changed object.
- old
Id String - The ID of the changed object on the base version.
- old
Path String - The path on the base version to the changed object.
- repository
Id String - target
Version String - is
Comparison BooleanFrom Merge Base
- are
Conflicts booleanIn File - Indicates whether the changed file contains conflicts.
- base
Version string - changes
Get
Repository File Diff Change[] - List of changed section in the file.
- file
Path string - id string
- The provider-assigned unique ID for this managed resource.
- is
Binary boolean - Indicates whether the file is binary.
- is
Large boolean - Indicates whether the file is large.
- new
Id string - The ID of the changed object on the target version.
- new
Path string - The path on the target version to the changed object.
- old
Id string - The ID of the changed object on the base version.
- old
Path string - The path on the base version to the changed object.
- repository
Id string - target
Version string - is
Comparison booleanFrom Merge Base
- are_
conflicts_ boolin_ file - Indicates whether the changed file contains conflicts.
- base_
version str - changes
Sequence[devops.
Get Repository File Diff Change] - List of changed section in the file.
- file_
path str - id str
- The provider-assigned unique ID for this managed resource.
- is_
binary bool - Indicates whether the file is binary.
- is_
large bool - Indicates whether the file is large.
- new_
id str - The ID of the changed object on the target version.
- new_
path str - The path on the target version to the changed object.
- old_
id str - The ID of the changed object on the base version.
- old_
path str - The path on the base version to the changed object.
- repository_
id str - target_
version str - is_
comparison_ boolfrom_ merge_ base
- are
Conflicts BooleanIn File - Indicates whether the changed file contains conflicts.
- base
Version String - changes List<Property Map>
- List of changed section in the file.
- file
Path String - id String
- The provider-assigned unique ID for this managed resource.
- is
Binary Boolean - Indicates whether the file is binary.
- is
Large Boolean - Indicates whether the file is large.
- new
Id String - The ID of the changed object on the target version.
- new
Path String - The path on the target version to the changed object.
- old
Id String - The ID of the changed object on the base version.
- old
Path String - The path on the base version to the changed object.
- repository
Id String - target
Version String - is
Comparison BooleanFrom Merge Base
Supporting Types
GetRepositoryFileDiffChange
- Base
Line int - The number of a line in the base version.
- Base
Span int - Number of lines chunk spans in base version.
- Diff
Sections List<GetRepository File Diff Change Diff Section> - List of difference section.
- Target
Line int - Line number in target version where changes begin.
- Target
Span int - Number of lines chunk spans in target version.
- Base
Line int - The number of a line in the base version.
- Base
Span int - Number of lines chunk spans in base version.
- Diff
Sections []GetRepository File Diff Change Diff Section - List of difference section.
- Target
Line int - Line number in target version where changes begin.
- Target
Span int - Number of lines chunk spans in target version.
- base
Line Integer - The number of a line in the base version.
- base
Span Integer - Number of lines chunk spans in base version.
- diff
Sections List<GetRepository File Diff Change Diff Section> - List of difference section.
- target
Line Integer - Line number in target version where changes begin.
- target
Span Integer - Number of lines chunk spans in target version.
- base
Line number - The number of a line in the base version.
- base
Span number - Number of lines chunk spans in base version.
- diff
Sections GetRepository File Diff Change Diff Section[] - List of difference section.
- target
Line number - Line number in target version where changes begin.
- target
Span number - Number of lines chunk spans in target version.
- base_
line int - The number of a line in the base version.
- base_
span int - Number of lines chunk spans in base version.
- diff_
sections Sequence[devops.Get Repository File Diff Change Diff Section] - List of difference section.
- target_
line int - Line number in target version where changes begin.
- target_
span int - Number of lines chunk spans in target version.
- base
Line Number - The number of a line in the base version.
- base
Span Number - Number of lines chunk spans in base version.
- diff
Sections List<Property Map> - List of difference section.
- target
Line Number - Line number in target version where changes begin.
- target
Span Number - Number of lines chunk spans in target version.
GetRepositoryFileDiffChangeDiffSection
- Lines
List<Get
Repository File Diff Change Diff Section Line> - The lines within changed section.
- Type string
- Type of change.
- Lines
[]Get
Repository File Diff Change Diff Section Line - The lines within changed section.
- Type string
- Type of change.
- lines
List<Get
Repository File Diff Change Diff Section Line> - The lines within changed section.
- type String
- Type of change.
- lines
Get
Repository File Diff Change Diff Section Line[] - The lines within changed section.
- type string
- Type of change.
- lines
Sequence[devops.
Get Repository File Diff Change Diff Section Line] - The lines within changed section.
- type str
- Type of change.
- lines List<Property Map>
- The lines within changed section.
- type String
- Type of change.
GetRepositoryFileDiffChangeDiffSectionLine
- Base
Line int - The number of a line in the base version.
- Conflict
Marker string - Indicates whether a line in a conflicted section of the difference is from the base version, the target version, or if its just a marker indicating the beginning, middle, or end of a conflicted section.
- Line
Content string - The contents of a line.
- Target
Line int - Line number in target version where changes begin.
- Base
Line int - The number of a line in the base version.
- Conflict
Marker string - Indicates whether a line in a conflicted section of the difference is from the base version, the target version, or if its just a marker indicating the beginning, middle, or end of a conflicted section.
- Line
Content string - The contents of a line.
- Target
Line int - Line number in target version where changes begin.
- base
Line Integer - The number of a line in the base version.
- conflict
Marker String - Indicates whether a line in a conflicted section of the difference is from the base version, the target version, or if its just a marker indicating the beginning, middle, or end of a conflicted section.
- line
Content String - The contents of a line.
- target
Line Integer - Line number in target version where changes begin.
- base
Line number - The number of a line in the base version.
- conflict
Marker string - Indicates whether a line in a conflicted section of the difference is from the base version, the target version, or if its just a marker indicating the beginning, middle, or end of a conflicted section.
- line
Content string - The contents of a line.
- target
Line number - Line number in target version where changes begin.
- base_
line int - The number of a line in the base version.
- conflict_
marker str - Indicates whether a line in a conflicted section of the difference is from the base version, the target version, or if its just a marker indicating the beginning, middle, or end of a conflicted section.
- line_
content str - The contents of a line.
- target_
line int - Line number in target version where changes begin.
- base
Line Number - The number of a line in the base version.
- conflict
Marker String - Indicates whether a line in a conflicted section of the difference is from the base version, the target version, or if its just a marker indicating the beginning, middle, or end of a conflicted section.
- line
Content String - The contents of a line.
- target
Line Number - Line number in target version where changes begin.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi