Oracle Cloud Infrastructure v3.9.0 published on Wednesday, Sep 24, 2025 by Pulumi
oci.DevOps.getRepositoryCommit
This data source provides details about a specific Repository Commit resource in Oracle Cloud Infrastructure Devops service.
Retrieves a repository’s commit by commit ID.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRepositoryCommit = oci.DevOps.getRepositoryCommit({
    commitId: testCommit.id,
    repositoryId: testRepository.id,
});
import pulumi
import pulumi_oci as oci
test_repository_commit = oci.DevOps.get_repository_commit(commit_id=test_commit["id"],
    repository_id=test_repository["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/devops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devops.GetRepositoryCommit(ctx, &devops.GetRepositoryCommitArgs{
			CommitId:     testCommit.Id,
			RepositoryId: 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 testRepositoryCommit = Oci.DevOps.GetRepositoryCommit.Invoke(new()
    {
        CommitId = testCommit.Id,
        RepositoryId = 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.GetRepositoryCommitArgs;
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 testRepositoryCommit = DevOpsFunctions.getRepositoryCommit(GetRepositoryCommitArgs.builder()
            .commitId(testCommit.id())
            .repositoryId(testRepository.id())
            .build());
    }
}
variables:
  testRepositoryCommit:
    fn::invoke:
      function: oci:DevOps:getRepositoryCommit
      arguments:
        commitId: ${testCommit.id}
        repositoryId: ${testRepository.id}
Using getRepositoryCommit
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 getRepositoryCommit(args: GetRepositoryCommitArgs, opts?: InvokeOptions): Promise<GetRepositoryCommitResult>
function getRepositoryCommitOutput(args: GetRepositoryCommitOutputArgs, opts?: InvokeOptions): Output<GetRepositoryCommitResult>def get_repository_commit(commit_id: Optional[str] = None,
                          repository_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetRepositoryCommitResult
def get_repository_commit_output(commit_id: Optional[pulumi.Input[str]] = None,
                          repository_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryCommitResult]func GetRepositoryCommit(ctx *Context, args *GetRepositoryCommitArgs, opts ...InvokeOption) (*GetRepositoryCommitResult, error)
func GetRepositoryCommitOutput(ctx *Context, args *GetRepositoryCommitOutputArgs, opts ...InvokeOption) GetRepositoryCommitResultOutput> Note: This function is named GetRepositoryCommit in the Go SDK.
public static class GetRepositoryCommit 
{
    public static Task<GetRepositoryCommitResult> InvokeAsync(GetRepositoryCommitArgs args, InvokeOptions? opts = null)
    public static Output<GetRepositoryCommitResult> Invoke(GetRepositoryCommitInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRepositoryCommitResult> getRepositoryCommit(GetRepositoryCommitArgs args, InvokeOptions options)
public static Output<GetRepositoryCommitResult> getRepositoryCommit(GetRepositoryCommitArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DevOps/getRepositoryCommit:getRepositoryCommit
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CommitId string
- A filter to return only resources that match the given commit ID.
- RepositoryId string
- Unique repository identifier.
- CommitId string
- A filter to return only resources that match the given commit ID.
- RepositoryId string
- Unique repository identifier.
- commitId String
- A filter to return only resources that match the given commit ID.
- repositoryId String
- Unique repository identifier.
- commitId string
- A filter to return only resources that match the given commit ID.
- repositoryId string
- Unique repository identifier.
- commit_id str
- A filter to return only resources that match the given commit ID.
- repository_id str
- Unique repository identifier.
- commitId String
- A filter to return only resources that match the given commit ID.
- repositoryId String
- Unique repository identifier.
getRepositoryCommit Result
The following output properties are available:
- string
- Email of the author of the repository.
- string
- Name of the author of the repository.
- CommitId string
- Commit hash pointed to by reference name.
- CommitMessage string
- The commit message.
- CommitterEmail string
- Email of who creates the commit.
- CommitterName string
- Name of who creates the commit.
- Id string
- The provider-assigned unique ID for this managed resource.
- ParentCommit List<string>Ids 
- An array of parent commit IDs of created commit.
- RepositoryId string
- TimeCreated string
- The time at which commit was created.
- TreeId string
- Tree information for the specified commit.
- string
- Email of the author of the repository.
- string
- Name of the author of the repository.
- CommitId string
- Commit hash pointed to by reference name.
- CommitMessage string
- The commit message.
- CommitterEmail string
- Email of who creates the commit.
- CommitterName string
- Name of who creates the commit.
- Id string
- The provider-assigned unique ID for this managed resource.
- ParentCommit []stringIds 
- An array of parent commit IDs of created commit.
- RepositoryId string
- TimeCreated string
- The time at which commit was created.
- TreeId string
- Tree information for the specified commit.
- String
- Email of the author of the repository.
- String
- Name of the author of the repository.
- commitId String
- Commit hash pointed to by reference name.
- commitMessage String
- The commit message.
- committerEmail String
- Email of who creates the commit.
- committerName String
- Name of who creates the commit.
- id String
- The provider-assigned unique ID for this managed resource.
- parentCommit List<String>Ids 
- An array of parent commit IDs of created commit.
- repositoryId String
- timeCreated String
- The time at which commit was created.
- treeId String
- Tree information for the specified commit.
- string
- Email of the author of the repository.
- string
- Name of the author of the repository.
- commitId string
- Commit hash pointed to by reference name.
- commitMessage string
- The commit message.
- committerEmail string
- Email of who creates the commit.
- committerName string
- Name of who creates the commit.
- id string
- The provider-assigned unique ID for this managed resource.
- parentCommit string[]Ids 
- An array of parent commit IDs of created commit.
- repositoryId string
- timeCreated string
- The time at which commit was created.
- treeId string
- Tree information for the specified commit.
- str
- Email of the author of the repository.
- str
- Name of the author of the repository.
- commit_id str
- Commit hash pointed to by reference name.
- commit_message str
- The commit message.
- committer_email str
- Email of who creates the commit.
- committer_name str
- Name of who creates the commit.
- id str
- The provider-assigned unique ID for this managed resource.
- parent_commit_ Sequence[str]ids 
- An array of parent commit IDs of created commit.
- repository_id str
- time_created str
- The time at which commit was created.
- tree_id str
- Tree information for the specified commit.
- String
- Email of the author of the repository.
- String
- Name of the author of the repository.
- commitId String
- Commit hash pointed to by reference name.
- commitMessage String
- The commit message.
- committerEmail String
- Email of who creates the commit.
- committerName String
- Name of who creates the commit.
- id String
- The provider-assigned unique ID for this managed resource.
- parentCommit List<String>Ids 
- An array of parent commit IDs of created commit.
- repositoryId String
- timeCreated String
- The time at which commit was created.
- treeId String
- Tree information for the specified commit.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.
