1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DevOps
  5. getRepositoryCommits
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.DevOps.getRepositoryCommits

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    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: oci_devops_repository.test_repository.id,
        authorName: _var.repository_commit_author_name,
        commitMessage: _var.repository_commit_commit_message,
        excludeRefName: _var.repository_commit_exclude_ref_name,
        filePath: _var.repository_commit_file_path,
        refName: _var.repository_commit_ref_name,
        timestampGreaterThanOrEqualTo: _var.repository_commit_timestamp_greater_than_or_equal_to,
        timestampLessThanOrEqualTo: _var.repository_commit_timestamp_less_than_or_equal_to,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_repository_commits = oci.DevOps.get_repository_commits(repository_id=oci_devops_repository["test_repository"]["id"],
        author_name=var["repository_commit_author_name"],
        commit_message=var["repository_commit_commit_message"],
        exclude_ref_name=var["repository_commit_exclude_ref_name"],
        file_path=var["repository_commit_file_path"],
        ref_name=var["repository_commit_ref_name"],
        timestamp_greater_than_or_equal_to=var["repository_commit_timestamp_greater_than_or_equal_to"],
        timestamp_less_than_or_equal_to=var["repository_commit_timestamp_less_than_or_equal_to"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/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:                  oci_devops_repository.Test_repository.Id,
    			AuthorName:                    pulumi.StringRef(_var.Repository_commit_author_name),
    			CommitMessage:                 pulumi.StringRef(_var.Repository_commit_commit_message),
    			ExcludeRefName:                pulumi.StringRef(_var.Repository_commit_exclude_ref_name),
    			FilePath:                      pulumi.StringRef(_var.Repository_commit_file_path),
    			RefName:                       pulumi.StringRef(_var.Repository_commit_ref_name),
    			TimestampGreaterThanOrEqualTo: pulumi.StringRef(_var.Repository_commit_timestamp_greater_than_or_equal_to),
    			TimestampLessThanOrEqualTo:    pulumi.StringRef(_var.Repository_commit_timestamp_less_than_or_equal_to),
    		}, 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 = oci_devops_repository.Test_repository.Id,
            AuthorName = @var.Repository_commit_author_name,
            CommitMessage = @var.Repository_commit_commit_message,
            ExcludeRefName = @var.Repository_commit_exclude_ref_name,
            FilePath = @var.Repository_commit_file_path,
            RefName = @var.Repository_commit_ref_name,
            TimestampGreaterThanOrEqualTo = @var.Repository_commit_timestamp_greater_than_or_equal_to,
            TimestampLessThanOrEqualTo = @var.Repository_commit_timestamp_less_than_or_equal_to,
        });
    
    });
    
    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(oci_devops_repository.test_repository().id())
                .authorName(var_.repository_commit_author_name())
                .commitMessage(var_.repository_commit_commit_message())
                .excludeRefName(var_.repository_commit_exclude_ref_name())
                .filePath(var_.repository_commit_file_path())
                .refName(var_.repository_commit_ref_name())
                .timestampGreaterThanOrEqualTo(var_.repository_commit_timestamp_greater_than_or_equal_to())
                .timestampLessThanOrEqualTo(var_.repository_commit_timestamp_less_than_or_equal_to())
                .build());
    
        }
    }
    
    variables:
      testRepositoryCommits:
        fn::invoke:
          Function: oci:DevOps:getRepositoryCommits
          Arguments:
            repositoryId: ${oci_devops_repository.test_repository.id}
            authorName: ${var.repository_commit_author_name}
            commitMessage: ${var.repository_commit_commit_message}
            excludeRefName: ${var.repository_commit_exclude_ref_name}
            filePath: ${var.repository_commit_file_path}
            refName: ${var.repository_commit_ref_name}
            timestampGreaterThanOrEqualTo: ${var.repository_commit_timestamp_greater_than_or_equal_to}
            timestampLessThanOrEqualTo: ${var.repository_commit_timestamp_less_than_or_equal_to}
    

    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[_devops.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[_devops.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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DevOps/getRepositoryCommits:getRepositoryCommits
      arguments:
        # arguments dictionary

    The following arguments are supported:

    RepositoryId string
    Unique repository identifier.
    AuthorName 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.
    ExcludeRefName string
    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<GetRepositoryCommitsFilter>
    RefName string
    A filter to return only resources that match the given reference name.
    TimestampGreaterThanOrEqualTo string
    A filter to return commits only created after the specified timestamp value.
    TimestampLessThanOrEqualTo string
    A filter to return commits only created before the specified timestamp value.
    RepositoryId string
    Unique repository identifier.
    AuthorName 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.
    ExcludeRefName string
    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 []GetRepositoryCommitsFilter
    RefName string
    A filter to return only resources that match the given reference name.
    TimestampGreaterThanOrEqualTo string
    A filter to return commits only created after the specified timestamp value.
    TimestampLessThanOrEqualTo string
    A filter to return commits only created before the specified timestamp value.
    repositoryId String
    Unique repository identifier.
    authorName 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.
    excludeRefName String
    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<GetRepositoryCommitsFilter>
    refName String
    A filter to return only resources that match the given reference name.
    timestampGreaterThanOrEqualTo String
    A filter to return commits only created after the specified timestamp value.
    timestampLessThanOrEqualTo String
    A filter to return commits only created before the specified timestamp value.
    repositoryId string
    Unique repository identifier.
    authorName 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.
    excludeRefName string
    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 GetRepositoryCommitsFilter[]
    refName string
    A filter to return only resources that match the given reference name.
    timestampGreaterThanOrEqualTo string
    A filter to return commits only created after the specified timestamp value.
    timestampLessThanOrEqualTo string
    A filter to return commits only created before the specified timestamp value.
    repository_id str
    Unique repository identifier.
    author_name 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_name str
    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[devops.GetRepositoryCommitsFilter]
    ref_name str
    A filter to return only resources that match the given reference name.
    timestamp_greater_than_or_equal_to str
    A filter to return commits only created after the specified timestamp value.
    timestamp_less_than_or_equal_to str
    A filter to return commits only created before the specified timestamp value.
    repositoryId String
    Unique repository identifier.
    authorName 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.
    excludeRefName String
    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.
    timestampGreaterThanOrEqualTo String
    A filter to return commits only created after the specified timestamp value.
    timestampLessThanOrEqualTo String
    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.
    RepositoryCommitCollections List<GetRepositoryCommitsRepositoryCommitCollection>
    The list of repository_commit_collection.
    RepositoryId string
    AuthorName string
    Name of the author of the repository.
    CommitMessage string
    The commit message.
    ExcludeRefName string
    FilePath string
    Filters List<GetRepositoryCommitsFilter>
    RefName string
    TimestampGreaterThanOrEqualTo string
    TimestampLessThanOrEqualTo string
    Id string
    The provider-assigned unique ID for this managed resource.
    RepositoryCommitCollections []GetRepositoryCommitsRepositoryCommitCollection
    The list of repository_commit_collection.
    RepositoryId string
    AuthorName string
    Name of the author of the repository.
    CommitMessage string
    The commit message.
    ExcludeRefName string
    FilePath string
    Filters []GetRepositoryCommitsFilter
    RefName string
    TimestampGreaterThanOrEqualTo string
    TimestampLessThanOrEqualTo string
    id String
    The provider-assigned unique ID for this managed resource.
    repositoryCommitCollections List<GetRepositoryCommitsRepositoryCommitCollection>
    The list of repository_commit_collection.
    repositoryId String
    authorName String
    Name of the author of the repository.
    commitMessage String
    The commit message.
    excludeRefName String
    filePath String
    filters List<GetRepositoryCommitsFilter>
    refName String
    timestampGreaterThanOrEqualTo String
    timestampLessThanOrEqualTo String
    id string
    The provider-assigned unique ID for this managed resource.
    repositoryCommitCollections GetRepositoryCommitsRepositoryCommitCollection[]
    The list of repository_commit_collection.
    repositoryId string
    authorName string
    Name of the author of the repository.
    commitMessage string
    The commit message.
    excludeRefName string
    filePath string
    filters GetRepositoryCommitsFilter[]
    refName string
    timestampGreaterThanOrEqualTo string
    timestampLessThanOrEqualTo string
    id str
    The provider-assigned unique ID for this managed resource.
    repository_commit_collections Sequence[devops.GetRepositoryCommitsRepositoryCommitCollection]
    The list of repository_commit_collection.
    repository_id str
    author_name str
    Name of the author of the repository.
    commit_message str
    The commit message.
    exclude_ref_name str
    file_path str
    filters Sequence[devops.GetRepositoryCommitsFilter]
    ref_name str
    timestamp_greater_than_or_equal_to str
    timestamp_less_than_or_equal_to str
    id String
    The provider-assigned unique ID for this managed resource.
    repositoryCommitCollections List<Property Map>
    The list of repository_commit_collection.
    repositoryId String
    authorName String
    Name of the author of the repository.
    commitMessage String
    The commit message.
    excludeRefName String
    filePath String
    filters List<Property Map>
    refName String
    timestampGreaterThanOrEqualTo String
    timestampLessThanOrEqualTo String

    Supporting Types

    GetRepositoryCommitsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetRepositoryCommitsRepositoryCommitCollection

    GetRepositoryCommitsRepositoryCommitCollectionItem

    AuthorEmail string
    Email of the author of the repository.
    AuthorName 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.
    DefinedTags Dictionary<string, object>
    FreeformTags Dictionary<string, object>
    ParentCommitIds List<string>
    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.
    AuthorEmail string
    Email of the author of the repository.
    AuthorName 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.
    DefinedTags map[string]interface{}
    FreeformTags map[string]interface{}
    ParentCommitIds []string
    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.
    authorEmail String
    Email of the author of the repository.
    authorName 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.
    definedTags Map<String,Object>
    freeformTags Map<String,Object>
    parentCommitIds List<String>
    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.
    authorEmail string
    Email of the author of the repository.
    authorName 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.
    definedTags {[key: string]: any}
    freeformTags {[key: string]: any}
    parentCommitIds string[]
    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.
    author_email str
    Email of the author of the repository.
    author_name 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.
    defined_tags Mapping[str, Any]
    freeform_tags Mapping[str, Any]
    parent_commit_ids Sequence[str]
    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.
    authorEmail String
    Email of the author of the repository.
    authorName 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.
    definedTags Map<Any>
    freeformTags Map<Any>
    parentCommitIds List<String>
    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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi