Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.DevOps.getRepositoryCommit
Explore with Pulumi AI
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/v2/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:
- Commit
Id string - A filter to return only resources that match the given commit ID.
 - Repository
Id string - Unique repository identifier.
 
- Commit
Id string - A filter to return only resources that match the given commit ID.
 - Repository
Id string - Unique repository identifier.
 
- commit
Id String - A filter to return only resources that match the given commit ID.
 - repository
Id String - Unique repository identifier.
 
- commit
Id string - A filter to return only resources that match the given commit ID.
 - repository
Id 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.
 
- commit
Id String - A filter to return only resources that match the given commit ID.
 - repository
Id 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.
 - Commit
Id string - Commit hash pointed to by reference name.
 - Commit
Message string - The commit message.
 - Committer
Email string - Email of who creates the commit.
 - Committer
Name string - Name of who creates the commit.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Parent
Commit List<string>Ids  - An array of parent commit IDs of created commit.
 - Repository
Id string - Time
Created string - The time at which commit was created.
 - Tree
Id string - Tree information for the specified commit.
 
- string
 - Email of the author of the repository.
 - string
 - Name of the author of the repository.
 - Commit
Id string - Commit hash pointed to by reference name.
 - Commit
Message string - The commit message.
 - Committer
Email string - Email of who creates the commit.
 - Committer
Name string - Name of who creates the commit.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Parent
Commit []stringIds  - An array of parent commit IDs of created commit.
 - Repository
Id string - Time
Created string - The time at which commit was created.
 - Tree
Id string - Tree information for the specified commit.
 
- String
 - Email of the author of the repository.
 - String
 - Name of the author of the repository.
 - commit
Id String - Commit hash pointed to by reference name.
 - commit
Message String - The commit message.
 - committer
Email String - Email of who creates the commit.
 - committer
Name String - Name of who creates the commit.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - parent
Commit List<String>Ids  - An array of parent commit IDs of created commit.
 - repository
Id String - time
Created String - The time at which commit was created.
 - tree
Id String - Tree information for the specified commit.
 
- string
 - Email of the author of the repository.
 - string
 - Name of the author of the repository.
 - commit
Id string - Commit hash pointed to by reference name.
 - commit
Message string - The commit message.
 - committer
Email string - Email of who creates the commit.
 - committer
Name string - Name of who creates the commit.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - parent
Commit string[]Ids  - An array of parent commit IDs of created commit.
 - repository
Id string - time
Created string - The time at which commit was created.
 - tree
Id 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.
 - commit
Id String - Commit hash pointed to by reference name.
 - commit
Message String - The commit message.
 - committer
Email String - Email of who creates the commit.
 - committer
Name String - Name of who creates the commit.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - parent
Commit List<String>Ids  - An array of parent commit IDs of created commit.
 - repository
Id String - time
Created String - The time at which commit was created.
 - tree
Id 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.