Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 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[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[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 dictionaryThe following arguments are supported:
- BaseVersion string
- The commit or reference name to compare changes against.
- RepositoryId string
- Unique repository identifier.
- TargetVersion string
- The commit or reference name where changes are coming from.
- Filters
List<GetRepository Diffs Filter> 
- IsComparison boolFrom Merge Base 
- Boolean value to indicate whether to use merge base or most recent revision.
- TargetRepository stringId 
- The target repository identifier
- BaseVersion string
- The commit or reference name to compare changes against.
- RepositoryId string
- Unique repository identifier.
- TargetVersion string
- The commit or reference name where changes are coming from.
- Filters
[]GetRepository Diffs Filter 
- IsComparison boolFrom Merge Base 
- Boolean value to indicate whether to use merge base or most recent revision.
- TargetRepository stringId 
- The target repository identifier
- baseVersion String
- The commit or reference name to compare changes against.
- repositoryId String
- Unique repository identifier.
- targetVersion String
- The commit or reference name where changes are coming from.
- filters
List<GetRepository Diffs Filter> 
- isComparison BooleanFrom Merge Base 
- Boolean value to indicate whether to use merge base or most recent revision.
- targetRepository StringId 
- The target repository identifier
- baseVersion string
- The commit or reference name to compare changes against.
- repositoryId string
- Unique repository identifier.
- targetVersion string
- The commit or reference name where changes are coming from.
- filters
GetRepository Diffs Filter[] 
- isComparison booleanFrom Merge Base 
- Boolean value to indicate whether to use merge base or most recent revision.
- targetRepository stringId 
- The target repository identifier
- base_version str
- The commit or reference name to compare changes against.
- repository_id str
- Unique repository identifier.
- target_version str
- The commit or reference name where changes are coming from.
- filters
Sequence[GetRepository 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
- baseVersion String
- The commit or reference name to compare changes against.
- repositoryId String
- Unique repository identifier.
- targetVersion String
- The commit or reference name where changes are coming from.
- filters List<Property Map>
- isComparison BooleanFrom Merge Base 
- Boolean value to indicate whether to use merge base or most recent revision.
- targetRepository StringId 
- The target repository identifier
getRepositoryDiffs Result
The following output properties are available:
- BaseVersion string
- DiffCollections List<GetRepository Diffs Diff Collection> 
- The list of diff_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- RepositoryId string
- TargetVersion string
- Filters
List<GetRepository Diffs Filter> 
- IsComparison boolFrom Merge Base 
- TargetRepository stringId 
- BaseVersion string
- DiffCollections []GetRepository Diffs Diff Collection 
- The list of diff_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- RepositoryId string
- TargetVersion string
- Filters
[]GetRepository Diffs Filter 
- IsComparison boolFrom Merge Base 
- TargetRepository stringId 
- baseVersion String
- diffCollections List<GetRepository Diffs Diff Collection> 
- The list of diff_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- repositoryId String
- targetVersion String
- filters
List<GetRepository Diffs Filter> 
- isComparison BooleanFrom Merge Base 
- targetRepository StringId 
- baseVersion string
- diffCollections GetRepository Diffs Diff Collection[] 
- The list of diff_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- repositoryId string
- targetVersion string
- filters
GetRepository Diffs Filter[] 
- isComparison booleanFrom Merge Base 
- targetRepository stringId 
- base_version str
- diff_collections Sequence[GetRepository 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[GetRepository Diffs Filter] 
- is_comparison_ boolfrom_ merge_ base 
- target_repository_ strid 
- baseVersion String
- diffCollections List<Property Map>
- The list of diff_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- repositoryId String
- targetVersion String
- filters List<Property Map>
- isComparison BooleanFrom Merge Base 
- targetRepository StringId 
Supporting Types
GetRepositoryDiffsDiffCollection    
GetRepositoryDiffsDiffCollectionItem     
- AreConflicts boolIn File 
- Indicates whether the changed file contains conflicts.
- Changes
List<GetRepository Diffs Diff Collection Item Change> 
- List of changed section in the file.
- Dictionary<string, string>
- IsBinary bool
- Indicates whether the file is binary.
- IsLarge bool
- Indicates whether the file is large.
- NewId string
- The ID of the changed object on the target version.
- NewPath string
- The path on the target version to the changed object.
- OldId string
- The ID of the changed object on the base version.
- OldPath string
- The path on the base version to the changed object.
- AreConflicts boolIn File 
- Indicates whether the changed file contains conflicts.
- Changes
[]GetRepository Diffs Diff Collection Item Change 
- List of changed section in the file.
- map[string]string
- IsBinary bool
- Indicates whether the file is binary.
- IsLarge bool
- Indicates whether the file is large.
- NewId string
- The ID of the changed object on the target version.
- NewPath string
- The path on the target version to the changed object.
- OldId string
- The ID of the changed object on the base version.
- OldPath string
- The path on the base version to the changed object.
- areConflicts BooleanIn File 
- Indicates whether the changed file contains conflicts.
- changes
List<GetRepository Diffs Diff Collection Item Change> 
- List of changed section in the file.
- Map<String,String>
- isBinary Boolean
- Indicates whether the file is binary.
- isLarge Boolean
- Indicates whether the file is large.
- newId String
- The ID of the changed object on the target version.
- newPath String
- The path on the target version to the changed object.
- oldId String
- The ID of the changed object on the base version.
- oldPath String
- The path on the base version to the changed object.
- areConflicts booleanIn File 
- Indicates whether the changed file contains conflicts.
- changes
GetRepository Diffs Diff Collection Item Change[] 
- List of changed section in the file.
- {[key: string]: string}
- isBinary boolean
- Indicates whether the file is binary.
- isLarge boolean
- Indicates whether the file is large.
- newId string
- The ID of the changed object on the target version.
- newPath string
- The path on the target version to the changed object.
- oldId string
- The ID of the changed object on the base version.
- oldPath string
- The path on the base version to the changed object.
- are_conflicts_ boolin_ file 
- Indicates whether the changed file contains conflicts.
- changes
Sequence[GetRepository Diffs Diff Collection Item Change] 
- List of changed section in the file.
- Mapping[str, str]
- 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.
- areConflicts BooleanIn File 
- Indicates whether the changed file contains conflicts.
- changes List<Property Map>
- List of changed section in the file.
- Map<String>
- isBinary Boolean
- Indicates whether the file is binary.
- isLarge Boolean
- Indicates whether the file is large.
- newId String
- The ID of the changed object on the target version.
- newPath String
- The path on the target version to the changed object.
- oldId String
- The ID of the changed object on the base version.
- oldPath String
- The path on the base version to the changed object.
GetRepositoryDiffsDiffCollectionItemChange      
- BaseLine int
- The number of a line in the base version.
- BaseSpan int
- Number of lines chunk spans in base version.
- DiffSections List<GetRepository Diffs Diff Collection Item Change Diff Section> 
- List of difference section.
- TargetLine int
- Line number in target version where changes begin.
- TargetSpan int
- Number of lines chunk spans in target version.
- BaseLine int
- The number of a line in the base version.
- BaseSpan int
- Number of lines chunk spans in base version.
- DiffSections []GetRepository Diffs Diff Collection Item Change Diff Section 
- List of difference section.
- TargetLine int
- Line number in target version where changes begin.
- TargetSpan int
- Number of lines chunk spans in target version.
- baseLine Integer
- The number of a line in the base version.
- baseSpan Integer
- Number of lines chunk spans in base version.
- diffSections List<GetRepository Diffs Diff Collection Item Change Diff Section> 
- List of difference section.
- targetLine Integer
- Line number in target version where changes begin.
- targetSpan Integer
- Number of lines chunk spans in target version.
- baseLine number
- The number of a line in the base version.
- baseSpan number
- Number of lines chunk spans in base version.
- diffSections GetRepository Diffs Diff Collection Item Change Diff Section[] 
- List of difference section.
- targetLine number
- Line number in target version where changes begin.
- targetSpan 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[GetRepository Diffs Diff Collection Item 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.
- baseLine Number
- The number of a line in the base version.
- baseSpan Number
- Number of lines chunk spans in base version.
- diffSections List<Property Map>
- List of difference section.
- targetLine Number
- Line number in target version where changes begin.
- targetSpan Number
- Number of lines chunk spans in target version.
GetRepositoryDiffsDiffCollectionItemChangeDiffSection        
- Lines
List<GetRepository Diffs Diff Collection Item Change Diff Section Line> 
- The lines within changed section.
- Type string
- Type of change.
- Lines
[]GetRepository Diffs Diff Collection Item Change Diff Section Line 
- The lines within changed section.
- Type string
- Type of change.
- lines
List<GetRepository Diffs Diff Collection Item Change Diff Section Line> 
- The lines within changed section.
- type String
- Type of change.
- lines
GetRepository Diffs Diff Collection Item Change Diff Section Line[] 
- The lines within changed section.
- type string
- Type of change.
- lines
Sequence[GetRepository Diffs Diff Collection Item 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.
GetRepositoryDiffsDiffCollectionItemChangeDiffSectionLine         
- BaseLine int
- The number of a line in the base version.
- ConflictMarker 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.
- LineContent string
- The contents of a line.
- TargetLine int
- Line number in target version where changes begin.
- BaseLine int
- The number of a line in the base version.
- ConflictMarker 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.
- LineContent string
- The contents of a line.
- TargetLine int
- Line number in target version where changes begin.
- baseLine Integer
- The number of a line in the base version.
- conflictMarker 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.
- lineContent String
- The contents of a line.
- targetLine Integer
- Line number in target version where changes begin.
- baseLine number
- The number of a line in the base version.
- conflictMarker 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.
- lineContent string
- The contents of a line.
- targetLine 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.
- baseLine Number
- The number of a line in the base version.
- conflictMarker 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.
- lineContent String
- The contents of a line.
- targetLine 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 ociTerraform Provider.