Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi
oci.DevOps.getRepositoryDiffs
Explore with Pulumi AI
This data source provides the list of Repository Diffs in Oracle Cloud Infrastructure Devops service.
Compares two revisions and lists the differences. Supports comparison between two references or commits.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRepositoryDiffs = oci.DevOps.getRepositoryDiffs({
baseVersion: repositoryDiffBaseVersion,
repositoryId: testRepository.id,
targetVersion: repositoryDiffTargetVersion,
isComparisonFromMergeBase: repositoryDiffIsComparisonFromMergeBase,
targetRepositoryId: testRepository.id,
});
import pulumi
import pulumi_oci as oci
test_repository_diffs = oci.DevOps.get_repository_diffs(base_version=repository_diff_base_version,
repository_id=test_repository["id"],
target_version=repository_diff_target_version,
is_comparison_from_merge_base=repository_diff_is_comparison_from_merge_base,
target_repository_id=test_repository["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/devops"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devops.GetRepositoryDiffs(ctx, &devops.GetRepositoryDiffsArgs{
BaseVersion: repositoryDiffBaseVersion,
RepositoryId: testRepository.Id,
TargetVersion: repositoryDiffTargetVersion,
IsComparisonFromMergeBase: pulumi.BoolRef(repositoryDiffIsComparisonFromMergeBase),
TargetRepositoryId: pulumi.StringRef(testRepository.Id),
}, 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 testRepositoryDiffs = Oci.DevOps.GetRepositoryDiffs.Invoke(new()
{
BaseVersion = repositoryDiffBaseVersion,
RepositoryId = testRepository.Id,
TargetVersion = repositoryDiffTargetVersion,
IsComparisonFromMergeBase = repositoryDiffIsComparisonFromMergeBase,
TargetRepositoryId = testRepository.Id,
});
});
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.GetRepositoryDiffsArgs;
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 testRepositoryDiffs = DevOpsFunctions.getRepositoryDiffs(GetRepositoryDiffsArgs.builder()
.baseVersion(repositoryDiffBaseVersion)
.repositoryId(testRepository.id())
.targetVersion(repositoryDiffTargetVersion)
.isComparisonFromMergeBase(repositoryDiffIsComparisonFromMergeBase)
.targetRepositoryId(testRepository.id())
.build());
}
}
variables:
testRepositoryDiffs:
fn::invoke:
function: oci:DevOps:getRepositoryDiffs
arguments:
baseVersion: ${repositoryDiffBaseVersion}
repositoryId: ${testRepository.id}
targetVersion: ${repositoryDiffTargetVersion}
isComparisonFromMergeBase: ${repositoryDiffIsComparisonFromMergeBase}
targetRepositoryId: ${testRepository.id}
Using getRepositoryDiffs
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 getRepositoryDiffs(args: GetRepositoryDiffsArgs, opts?: InvokeOptions): Promise<GetRepositoryDiffsResult>
function getRepositoryDiffsOutput(args: GetRepositoryDiffsOutputArgs, opts?: InvokeOptions): Output<GetRepositoryDiffsResult>
def get_repository_diffs(base_version: Optional[str] = None,
filters: Optional[Sequence[_devops.GetRepositoryDiffsFilter]] = None,
is_comparison_from_merge_base: Optional[bool] = None,
repository_id: Optional[str] = None,
target_repository_id: Optional[str] = None,
target_version: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRepositoryDiffsResult
def get_repository_diffs_output(base_version: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_devops.GetRepositoryDiffsFilterArgs]]]] = None,
is_comparison_from_merge_base: Optional[pulumi.Input[bool]] = None,
repository_id: Optional[pulumi.Input[str]] = None,
target_repository_id: Optional[pulumi.Input[str]] = None,
target_version: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryDiffsResult]
func GetRepositoryDiffs(ctx *Context, args *GetRepositoryDiffsArgs, opts ...InvokeOption) (*GetRepositoryDiffsResult, error)
func GetRepositoryDiffsOutput(ctx *Context, args *GetRepositoryDiffsOutputArgs, opts ...InvokeOption) GetRepositoryDiffsResultOutput
> Note: This function is named GetRepositoryDiffs
in the Go SDK.
public static class GetRepositoryDiffs
{
public static Task<GetRepositoryDiffsResult> InvokeAsync(GetRepositoryDiffsArgs args, InvokeOptions? opts = null)
public static Output<GetRepositoryDiffsResult> Invoke(GetRepositoryDiffsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRepositoryDiffsResult> getRepositoryDiffs(GetRepositoryDiffsArgs args, InvokeOptions options)
public static Output<GetRepositoryDiffsResult> getRepositoryDiffs(GetRepositoryDiffsArgs args, InvokeOptions options)
fn::invoke:
function: oci:DevOps/getRepositoryDiffs:getRepositoryDiffs
arguments:
# arguments dictionary
The following arguments are supported:
- Base
Version This property is required. string - The commit or reference name to compare changes against.
- Repository
Id This property is required. string - Unique repository identifier.
- Target
Version This property is required. string - The commit or reference name where changes are coming from.
- Filters
Changes to this property will trigger replacement.
Repository Diffs Filter> - Is
Comparison boolFrom Merge Base - Boolean value to indicate whether to use merge base or most recent revision.
- Target
Repository stringId - The target repository identifier
- Base
Version This property is required. string - The commit or reference name to compare changes against.
- Repository
Id This property is required. string - Unique repository identifier.
- Target
Version This property is required. string - The commit or reference name where changes are coming from.
- Filters
Changes to this property will trigger replacement.
Repository Diffs Filter - Is
Comparison boolFrom Merge Base - Boolean value to indicate whether to use merge base or most recent revision.
- Target
Repository stringId - The target repository identifier
- base
Version This property is required. String - The commit or reference name to compare changes against.
- repository
Id This property is required. String - Unique repository identifier.
- target
Version This property is required. String - The commit or reference name where changes are coming from.
- filters
Changes to this property will trigger replacement.
Repository Diffs Filter> - is
Comparison BooleanFrom Merge Base - Boolean value to indicate whether to use merge base or most recent revision.
- target
Repository StringId - The target repository identifier
- base
Version This property is required. string - The commit or reference name to compare changes against.
- repository
Id This property is required. string - Unique repository identifier.
- target
Version This property is required. string - The commit or reference name where changes are coming from.
- filters
Changes to this property will trigger replacement.
Repository Diffs Filter[] - is
Comparison booleanFrom Merge Base - Boolean value to indicate whether to use merge base or most recent revision.
- target
Repository stringId - The target repository identifier
- base_
version This property is required. str - The commit or reference name to compare changes against.
- repository_
id This property is required. str - Unique repository identifier.
- target_
version This property is required. str - The commit or reference name where changes are coming from.
- filters
Changes to this property will trigger replacement.
Get Repository Diffs Filter] - is_
comparison_ boolfrom_ merge_ base - Boolean value to indicate whether to use merge base or most recent revision.
- target_
repository_ strid - The target repository identifier
- base
Version This property is required. String - The commit or reference name to compare changes against.
- repository
Id This property is required. String - Unique repository identifier.
- target
Version This property is required. String - The commit or reference name where changes are coming from.
- filters
Changes to this property will trigger replacement.
- is
Comparison BooleanFrom Merge Base - Boolean value to indicate whether to use merge base or most recent revision.
- target
Repository StringId - The target repository identifier
getRepositoryDiffs Result
The following output properties are available:
- Base
Version string - Diff
Collections List<GetRepository Diffs Diff Collection> - The list of diff_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository
Id string - Target
Version string - Filters
List<Get
Repository Diffs Filter> - Is
Comparison boolFrom Merge Base - Target
Repository stringId
- Base
Version string - Diff
Collections []GetRepository Diffs Diff Collection - The list of diff_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository
Id string - Target
Version string - Filters
[]Get
Repository Diffs Filter - Is
Comparison boolFrom Merge Base - Target
Repository stringId
- base
Version String - diff
Collections List<GetRepository Diffs Diff Collection> - The list of diff_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- repository
Id String - target
Version String - filters
List<Get
Repository Diffs Filter> - is
Comparison BooleanFrom Merge Base - target
Repository StringId
- base
Version string - diff
Collections GetRepository Diffs Diff Collection[] - The list of diff_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- repository
Id string - target
Version string - filters
Get
Repository Diffs Filter[] - is
Comparison booleanFrom Merge Base - target
Repository stringId
- base_
version str - diff_
collections Sequence[devops.Get Repository Diffs Diff Collection] - The list of diff_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- repository_
id str - target_
version str - filters
Sequence[devops.
Get Repository Diffs Filter] - is_
comparison_ boolfrom_ merge_ base - target_
repository_ strid
- base
Version String - diff
Collections List<Property Map> - The list of diff_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- repository
Id String - target
Version String - filters List<Property Map>
- is
Comparison BooleanFrom Merge Base - target
Repository StringId
Supporting Types
GetRepositoryDiffsDiffCollection
- Items
This property is required. List<GetRepository Diffs Diff Collection Item>
- Items
This property is required. []GetRepository Diffs Diff Collection Item
- items
This property is required. List<GetRepository Diffs Diff Collection Item>
- items
This property is required. GetRepository Diffs Diff Collection Item[]
- items
This property is required. Sequence[devops.Get Repository Diffs Diff Collection Item]
- items
This property is required. List<Property Map>
GetRepositoryDiffsDiffCollectionItem
- Are
Conflicts In File This property is required. bool - Indicates whether the changed file contains conflicts.
- Changes
This property is required. List<GetRepository Diffs Diff Collection Item Change> - List of changed section in the file.
This property is required. Dictionary<string, string>- Is
Binary This property is required. bool - Indicates whether the file is binary.
- Is
Large This property is required. bool - Indicates whether the file is large.
- New
Id This property is required. string - The ID of the changed object on the target version.
- New
Path This property is required. string - The path on the target version to the changed object.
- Old
Id This property is required. string - The ID of the changed object on the base version.
- Old
Path This property is required. string - The path on the base version to the changed object.
- Are
Conflicts In File This property is required. bool - Indicates whether the changed file contains conflicts.
- Changes
This property is required. []GetRepository Diffs Diff Collection Item Change - List of changed section in the file.
This property is required. map[string]string- Is
Binary This property is required. bool - Indicates whether the file is binary.
- Is
Large This property is required. bool - Indicates whether the file is large.
- New
Id This property is required. string - The ID of the changed object on the target version.
- New
Path This property is required. string - The path on the target version to the changed object.
- Old
Id This property is required. string - The ID of the changed object on the base version.
- Old
Path This property is required. string - The path on the base version to the changed object.
- are
Conflicts In File This property is required. Boolean - Indicates whether the changed file contains conflicts.
- changes
This property is required. List<GetRepository Diffs Diff Collection Item Change> - List of changed section in the file.
This property is required. Map<String,String>- is
Binary This property is required. Boolean - Indicates whether the file is binary.
- is
Large This property is required. Boolean - Indicates whether the file is large.
- new
Id This property is required. String - The ID of the changed object on the target version.
- new
Path This property is required. String - The path on the target version to the changed object.
- old
Id This property is required. String - The ID of the changed object on the base version.
- old
Path This property is required. String - The path on the base version to the changed object.
- are
Conflicts In File This property is required. boolean - Indicates whether the changed file contains conflicts.
- changes
This property is required. GetRepository Diffs Diff Collection Item Change[] - List of changed section in the file.
This property is required. {[key: string]: string}- is
Binary This property is required. boolean - Indicates whether the file is binary.
- is
Large This property is required. boolean - Indicates whether the file is large.
- new
Id This property is required. string - The ID of the changed object on the target version.
- new
Path This property is required. string - The path on the target version to the changed object.
- old
Id This property is required. string - The ID of the changed object on the base version.
- old
Path This property is required. string - The path on the base version to the changed object.
- are_
conflicts_ in_ file This property is required. bool - Indicates whether the changed file contains conflicts.
- changes
This property is required. Sequence[devops.Get Repository Diffs Diff Collection Item Change] - List of changed section in the file.
This property is required. Mapping[str, str]- is_
binary This property is required. bool - Indicates whether the file is binary.
- is_
large This property is required. bool - Indicates whether the file is large.
- new_
id This property is required. str - The ID of the changed object on the target version.
- new_
path This property is required. str - The path on the target version to the changed object.
- old_
id This property is required. str - The ID of the changed object on the base version.
- old_
path This property is required. str - The path on the base version to the changed object.
- are
Conflicts In File This property is required. Boolean - Indicates whether the changed file contains conflicts.
- changes
This property is required. List<Property Map> - List of changed section in the file.
This property is required. Map<String>- is
Binary This property is required. Boolean - Indicates whether the file is binary.
- is
Large This property is required. Boolean - Indicates whether the file is large.
- new
Id This property is required. String - The ID of the changed object on the target version.
- new
Path This property is required. String - The path on the target version to the changed object.
- old
Id This property is required. String - The ID of the changed object on the base version.
- old
Path This property is required. String - The path on the base version to the changed object.
GetRepositoryDiffsDiffCollectionItemChange
- Base
Line This property is required. int - The number of a line in the base version.
- Base
Span This property is required. int - Number of lines chunk spans in base version.
- Diff
Sections This property is required. List<GetRepository Diffs Diff Collection Item Change Diff Section> - List of difference section.
- Target
Line This property is required. int - Line number in target version where changes begin.
- Target
Span This property is required. int - Number of lines chunk spans in target version.
- Base
Line This property is required. int - The number of a line in the base version.
- Base
Span This property is required. int - Number of lines chunk spans in base version.
- Diff
Sections This property is required. []GetRepository Diffs Diff Collection Item Change Diff Section - List of difference section.
- Target
Line This property is required. int - Line number in target version where changes begin.
- Target
Span This property is required. int - Number of lines chunk spans in target version.
- base
Line This property is required. Integer - The number of a line in the base version.
- base
Span This property is required. Integer - Number of lines chunk spans in base version.
- diff
Sections This property is required. List<GetRepository Diffs Diff Collection Item Change Diff Section> - List of difference section.
- target
Line This property is required. Integer - Line number in target version where changes begin.
- target
Span This property is required. Integer - Number of lines chunk spans in target version.
- base
Line This property is required. number - The number of a line in the base version.
- base
Span This property is required. number - Number of lines chunk spans in base version.
- diff
Sections This property is required. GetRepository Diffs Diff Collection Item Change Diff Section[] - List of difference section.
- target
Line This property is required. number - Line number in target version where changes begin.
- target
Span This property is required. number - Number of lines chunk spans in target version.
- base_
line This property is required. int - The number of a line in the base version.
- base_
span This property is required. int - Number of lines chunk spans in base version.
- diff_
sections This property is required. Sequence[devops.Get Repository Diffs Diff Collection Item Change Diff Section] - List of difference section.
- target_
line This property is required. int - Line number in target version where changes begin.
- target_
span This property is required. int - Number of lines chunk spans in target version.
- base
Line This property is required. Number - The number of a line in the base version.
- base
Span This property is required. Number - Number of lines chunk spans in base version.
- diff
Sections This property is required. List<Property Map> - List of difference section.
- target
Line This property is required. Number - Line number in target version where changes begin.
- target
Span This property is required. Number - Number of lines chunk spans in target version.
GetRepositoryDiffsDiffCollectionItemChangeDiffSection
- Lines
This property is required. List<GetRepository Diffs Diff Collection Item Change Diff Section Line> - The lines within changed section.
- Type
This property is required. string - Type of change.
- Lines
This property is required. []GetRepository Diffs Diff Collection Item Change Diff Section Line - The lines within changed section.
- Type
This property is required. string - Type of change.
- lines
This property is required. List<GetRepository Diffs Diff Collection Item Change Diff Section Line> - The lines within changed section.
- type
This property is required. String - Type of change.
- lines
This property is required. GetRepository Diffs Diff Collection Item Change Diff Section Line[] - The lines within changed section.
- type
This property is required. string - Type of change.
- lines
This property is required. Sequence[devops.Get Repository Diffs Diff Collection Item Change Diff Section Line] - The lines within changed section.
- type
This property is required. str - Type of change.
- lines
This property is required. List<Property Map> - The lines within changed section.
- type
This property is required. String - Type of change.
GetRepositoryDiffsDiffCollectionItemChangeDiffSectionLine
- Base
Line This property is required. int - The number of a line in the base version.
- Conflict
Marker This property is required. 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 This property is required. string - The contents of a line.
- Target
Line This property is required. int - Line number in target version where changes begin.
- Base
Line This property is required. int - The number of a line in the base version.
- Conflict
Marker This property is required. 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 This property is required. string - The contents of a line.
- Target
Line This property is required. int - Line number in target version where changes begin.
- base
Line This property is required. Integer - The number of a line in the base version.
- conflict
Marker This property is required. 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 This property is required. String - The contents of a line.
- target
Line This property is required. Integer - Line number in target version where changes begin.
- base
Line This property is required. number - The number of a line in the base version.
- conflict
Marker This property is required. 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 This property is required. string - The contents of a line.
- target
Line This property is required. number - Line number in target version where changes begin.
- base_
line This property is required. int - The number of a line in the base version.
- conflict_
marker This property is required. 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 This property is required. str - The contents of a line.
- target_
line This property is required. int - Line number in target version where changes begin.
- base
Line This property is required. Number - The number of a line in the base version.
- conflict
Marker This property is required. 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 This property is required. String - The contents of a line.
- target
Line This property is required. Number - Line number in target version where changes begin.
GetRepositoryDiffsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.