Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.DevOps.getRepositoryCommits
Explore with Pulumi AI
This data source provides the list of Repository Commits in Oracle Cloud Infrastructure Devops service.
Returns a list of commits.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRepositoryCommits = oci.DevOps.getRepositoryCommits({
    repositoryId: testRepository.id,
    authorName: repositoryCommitAuthorName,
    commitMessage: repositoryCommitCommitMessage,
    excludeRefName: repositoryCommitExcludeRefName,
    filePath: repositoryCommitFilePath,
    refName: repositoryCommitRefName,
    timestampGreaterThanOrEqualTo: repositoryCommitTimestampGreaterThanOrEqualTo,
    timestampLessThanOrEqualTo: repositoryCommitTimestampLessThanOrEqualTo,
});
import pulumi
import pulumi_oci as oci
test_repository_commits = oci.DevOps.get_repository_commits(repository_id=test_repository["id"],
    author_name=repository_commit_author_name,
    commit_message=repository_commit_commit_message,
    exclude_ref_name=repository_commit_exclude_ref_name,
    file_path=repository_commit_file_path,
    ref_name=repository_commit_ref_name,
    timestamp_greater_than_or_equal_to=repository_commit_timestamp_greater_than_or_equal_to,
    timestamp_less_than_or_equal_to=repository_commit_timestamp_less_than_or_equal_to)
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.GetRepositoryCommits(ctx, &devops.GetRepositoryCommitsArgs{
			RepositoryId:                  testRepository.Id,
			AuthorName:                    pulumi.StringRef(repositoryCommitAuthorName),
			CommitMessage:                 pulumi.StringRef(repositoryCommitCommitMessage),
			ExcludeRefName:                pulumi.StringRef(repositoryCommitExcludeRefName),
			FilePath:                      pulumi.StringRef(repositoryCommitFilePath),
			RefName:                       pulumi.StringRef(repositoryCommitRefName),
			TimestampGreaterThanOrEqualTo: pulumi.StringRef(repositoryCommitTimestampGreaterThanOrEqualTo),
			TimestampLessThanOrEqualTo:    pulumi.StringRef(repositoryCommitTimestampLessThanOrEqualTo),
		}, 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 testRepositoryCommits = Oci.DevOps.GetRepositoryCommits.Invoke(new()
    {
        RepositoryId = testRepository.Id,
        AuthorName = repositoryCommitAuthorName,
        CommitMessage = repositoryCommitCommitMessage,
        ExcludeRefName = repositoryCommitExcludeRefName,
        FilePath = repositoryCommitFilePath,
        RefName = repositoryCommitRefName,
        TimestampGreaterThanOrEqualTo = repositoryCommitTimestampGreaterThanOrEqualTo,
        TimestampLessThanOrEqualTo = repositoryCommitTimestampLessThanOrEqualTo,
    });
});
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.GetRepositoryCommitsArgs;
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 testRepositoryCommits = DevOpsFunctions.getRepositoryCommits(GetRepositoryCommitsArgs.builder()
            .repositoryId(testRepository.id())
            .authorName(repositoryCommitAuthorName)
            .commitMessage(repositoryCommitCommitMessage)
            .excludeRefName(repositoryCommitExcludeRefName)
            .filePath(repositoryCommitFilePath)
            .refName(repositoryCommitRefName)
            .timestampGreaterThanOrEqualTo(repositoryCommitTimestampGreaterThanOrEqualTo)
            .timestampLessThanOrEqualTo(repositoryCommitTimestampLessThanOrEqualTo)
            .build());
    }
}
variables:
  testRepositoryCommits:
    fn::invoke:
      function: oci:DevOps:getRepositoryCommits
      arguments:
        repositoryId: ${testRepository.id}
        authorName: ${repositoryCommitAuthorName}
        commitMessage: ${repositoryCommitCommitMessage}
        excludeRefName: ${repositoryCommitExcludeRefName}
        filePath: ${repositoryCommitFilePath}
        refName: ${repositoryCommitRefName}
        timestampGreaterThanOrEqualTo: ${repositoryCommitTimestampGreaterThanOrEqualTo}
        timestampLessThanOrEqualTo: ${repositoryCommitTimestampLessThanOrEqualTo}
Using getRepositoryCommits
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 getRepositoryCommits(args: GetRepositoryCommitsArgs, opts?: InvokeOptions): Promise<GetRepositoryCommitsResult>
function getRepositoryCommitsOutput(args: GetRepositoryCommitsOutputArgs, opts?: InvokeOptions): Output<GetRepositoryCommitsResult>def get_repository_commits(author_name: Optional[str] = None,
                           commit_message: Optional[str] = None,
                           exclude_ref_name: Optional[str] = None,
                           file_path: Optional[str] = None,
                           filters: Optional[Sequence[GetRepositoryCommitsFilter]] = None,
                           ref_name: Optional[str] = None,
                           repository_id: Optional[str] = None,
                           timestamp_greater_than_or_equal_to: Optional[str] = None,
                           timestamp_less_than_or_equal_to: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetRepositoryCommitsResult
def get_repository_commits_output(author_name: Optional[pulumi.Input[str]] = None,
                           commit_message: Optional[pulumi.Input[str]] = None,
                           exclude_ref_name: Optional[pulumi.Input[str]] = None,
                           file_path: Optional[pulumi.Input[str]] = None,
                           filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetRepositoryCommitsFilterArgs]]]] = None,
                           ref_name: Optional[pulumi.Input[str]] = None,
                           repository_id: Optional[pulumi.Input[str]] = None,
                           timestamp_greater_than_or_equal_to: Optional[pulumi.Input[str]] = None,
                           timestamp_less_than_or_equal_to: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryCommitsResult]func GetRepositoryCommits(ctx *Context, args *GetRepositoryCommitsArgs, opts ...InvokeOption) (*GetRepositoryCommitsResult, error)
func GetRepositoryCommitsOutput(ctx *Context, args *GetRepositoryCommitsOutputArgs, opts ...InvokeOption) GetRepositoryCommitsResultOutput> Note: This function is named GetRepositoryCommits in the Go SDK.
public static class GetRepositoryCommits 
{
    public static Task<GetRepositoryCommitsResult> InvokeAsync(GetRepositoryCommitsArgs args, InvokeOptions? opts = null)
    public static Output<GetRepositoryCommitsResult> Invoke(GetRepositoryCommitsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRepositoryCommitsResult> getRepositoryCommits(GetRepositoryCommitsArgs args, InvokeOptions options)
public static Output<GetRepositoryCommitsResult> getRepositoryCommits(GetRepositoryCommitsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DevOps/getRepositoryCommits:getRepositoryCommits
  arguments:
    # arguments dictionaryThe following arguments are supported:
- RepositoryId string
- Unique repository identifier.
- string
- A filter to return any commits that are pushed by the requested author.
- CommitMessage string
- A filter to return any commits that contains the given message.
- ExcludeRef stringName 
- A filter to exclude commits that match the given reference name.
- FilePath string
- A filter to return only commits that affect any of the specified paths.
- Filters
List<GetRepository Commits Filter> 
- RefName string
- A filter to return only resources that match the given reference name.
- TimestampGreater stringThan Or Equal To 
- A filter to return commits only created after the specified timestamp value.
- TimestampLess stringThan Or Equal To 
- A filter to return commits only created before the specified timestamp value.
- RepositoryId string
- Unique repository identifier.
- string
- A filter to return any commits that are pushed by the requested author.
- CommitMessage string
- A filter to return any commits that contains the given message.
- ExcludeRef stringName 
- A filter to exclude commits that match the given reference name.
- FilePath string
- A filter to return only commits that affect any of the specified paths.
- Filters
[]GetRepository Commits Filter 
- RefName string
- A filter to return only resources that match the given reference name.
- TimestampGreater stringThan Or Equal To 
- A filter to return commits only created after the specified timestamp value.
- TimestampLess stringThan Or Equal To 
- A filter to return commits only created before the specified timestamp value.
- repositoryId String
- Unique repository identifier.
- String
- A filter to return any commits that are pushed by the requested author.
- commitMessage String
- A filter to return any commits that contains the given message.
- excludeRef StringName 
- A filter to exclude commits that match the given reference name.
- filePath String
- A filter to return only commits that affect any of the specified paths.
- filters
List<GetRepository Commits Filter> 
- refName String
- A filter to return only resources that match the given reference name.
- timestampGreater StringThan Or Equal To 
- A filter to return commits only created after the specified timestamp value.
- timestampLess StringThan Or Equal To 
- A filter to return commits only created before the specified timestamp value.
- repositoryId string
- Unique repository identifier.
- string
- A filter to return any commits that are pushed by the requested author.
- commitMessage string
- A filter to return any commits that contains the given message.
- excludeRef stringName 
- A filter to exclude commits that match the given reference name.
- filePath string
- A filter to return only commits that affect any of the specified paths.
- filters
GetRepository Commits Filter[] 
- refName string
- A filter to return only resources that match the given reference name.
- timestampGreater stringThan Or Equal To 
- A filter to return commits only created after the specified timestamp value.
- timestampLess stringThan Or Equal To 
- A filter to return commits only created before the specified timestamp value.
- repository_id str
- Unique repository identifier.
- str
- A filter to return any commits that are pushed by the requested author.
- commit_message str
- A filter to return any commits that contains the given message.
- exclude_ref_ strname 
- A filter to exclude commits that match the given reference name.
- file_path str
- A filter to return only commits that affect any of the specified paths.
- filters
Sequence[GetRepository Commits Filter] 
- ref_name str
- A filter to return only resources that match the given reference name.
- timestamp_greater_ strthan_ or_ equal_ to 
- A filter to return commits only created after the specified timestamp value.
- timestamp_less_ strthan_ or_ equal_ to 
- A filter to return commits only created before the specified timestamp value.
- repositoryId String
- Unique repository identifier.
- String
- A filter to return any commits that are pushed by the requested author.
- commitMessage String
- A filter to return any commits that contains the given message.
- excludeRef StringName 
- A filter to exclude commits that match the given reference name.
- filePath String
- A filter to return only commits that affect any of the specified paths.
- filters List<Property Map>
- refName String
- A filter to return only resources that match the given reference name.
- timestampGreater StringThan Or Equal To 
- A filter to return commits only created after the specified timestamp value.
- timestampLess StringThan Or Equal To 
- A filter to return commits only created before the specified timestamp value.
getRepositoryCommits Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- RepositoryCommit List<GetCollections Repository Commits Repository Commit Collection> 
- The list of repository_commit_collection.
- RepositoryId string
- string
- Name of the author of the repository.
- CommitMessage string
- The commit message.
- ExcludeRef stringName 
- FilePath string
- Filters
List<GetRepository Commits Filter> 
- RefName string
- TimestampGreater stringThan Or Equal To 
- TimestampLess stringThan Or Equal To 
- Id string
- The provider-assigned unique ID for this managed resource.
- RepositoryCommit []GetCollections Repository Commits Repository Commit Collection 
- The list of repository_commit_collection.
- RepositoryId string
- string
- Name of the author of the repository.
- CommitMessage string
- The commit message.
- ExcludeRef stringName 
- FilePath string
- Filters
[]GetRepository Commits Filter 
- RefName string
- TimestampGreater stringThan Or Equal To 
- TimestampLess stringThan Or Equal To 
- id String
- The provider-assigned unique ID for this managed resource.
- repositoryCommit List<GetCollections Repository Commits Repository Commit Collection> 
- The list of repository_commit_collection.
- repositoryId String
- String
- Name of the author of the repository.
- commitMessage String
- The commit message.
- excludeRef StringName 
- filePath String
- filters
List<GetRepository Commits Filter> 
- refName String
- timestampGreater StringThan Or Equal To 
- timestampLess StringThan Or Equal To 
- id string
- The provider-assigned unique ID for this managed resource.
- repositoryCommit GetCollections Repository Commits Repository Commit Collection[] 
- The list of repository_commit_collection.
- repositoryId string
- string
- Name of the author of the repository.
- commitMessage string
- The commit message.
- excludeRef stringName 
- filePath string
- filters
GetRepository Commits Filter[] 
- refName string
- timestampGreater stringThan Or Equal To 
- timestampLess stringThan Or Equal To 
- id str
- The provider-assigned unique ID for this managed resource.
- repository_commit_ Sequence[Getcollections Repository Commits Repository Commit Collection] 
- The list of repository_commit_collection.
- repository_id str
- str
- Name of the author of the repository.
- commit_message str
- The commit message.
- exclude_ref_ strname 
- file_path str
- filters
Sequence[GetRepository Commits Filter] 
- ref_name str
- timestamp_greater_ strthan_ or_ equal_ to 
- timestamp_less_ strthan_ or_ equal_ to 
- id String
- The provider-assigned unique ID for this managed resource.
- repositoryCommit List<Property Map>Collections 
- The list of repository_commit_collection.
- repositoryId String
- String
- Name of the author of the repository.
- commitMessage String
- The commit message.
- excludeRef StringName 
- filePath String
- filters List<Property Map>
- refName String
- timestampGreater StringThan Or Equal To 
- timestampLess StringThan Or Equal To 
Supporting Types
GetRepositoryCommitsFilter   
GetRepositoryCommitsRepositoryCommitCollection     
GetRepositoryCommitsRepositoryCommitCollectionItem      
- string
- Email of the author of the repository.
- string
- A filter to return any commits that are pushed by the requested author.
- CommitId string
- Commit hash pointed to by reference name.
- CommitMessage string
- A filter to return any commits that contains the given message.
- CommitterEmail string
- Email of who creates the commit.
- CommitterName string
- Name of who creates the commit.
- Dictionary<string, string>
- Dictionary<string, string>
- ParentCommit List<string>Ids 
- An array of parent commit IDs of created commit.
- 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
- A filter to return any commits that are pushed by the requested author.
- CommitId string
- Commit hash pointed to by reference name.
- CommitMessage string
- A filter to return any commits that contains the given message.
- CommitterEmail string
- Email of who creates the commit.
- CommitterName string
- Name of who creates the commit.
- map[string]string
- map[string]string
- ParentCommit []stringIds 
- An array of parent commit IDs of created commit.
- 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
- A filter to return any commits that are pushed by the requested author.
- commitId String
- Commit hash pointed to by reference name.
- commitMessage String
- A filter to return any commits that contains the given message.
- committerEmail String
- Email of who creates the commit.
- committerName String
- Name of who creates the commit.
- Map<String,String>
- Map<String,String>
- parentCommit List<String>Ids 
- An array of parent commit IDs of created commit.
- 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
- A filter to return any commits that are pushed by the requested author.
- commitId string
- Commit hash pointed to by reference name.
- commitMessage string
- A filter to return any commits that contains the given message.
- committerEmail string
- Email of who creates the commit.
- committerName string
- Name of who creates the commit.
- {[key: string]: string}
- {[key: string]: string}
- parentCommit string[]Ids 
- An array of parent commit IDs of created commit.
- 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
- A filter to return any commits that are pushed by the requested author.
- commit_id str
- Commit hash pointed to by reference name.
- commit_message str
- A filter to return any commits that contains the given message.
- committer_email str
- Email of who creates the commit.
- committer_name str
- Name of who creates the commit.
- Mapping[str, str]
- Mapping[str, str]
- parent_commit_ Sequence[str]ids 
- An array of parent commit IDs of created commit.
- 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
- A filter to return any commits that are pushed by the requested author.
- commitId String
- Commit hash pointed to by reference name.
- commitMessage String
- A filter to return any commits that contains the given message.
- committerEmail String
- Email of who creates the commit.
- committerName String
- Name of who creates the commit.
- Map<String>
- Map<String>
- parentCommit List<String>Ids 
- An array of parent commit IDs of created commit.
- 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.