1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DevOps
  5. getRepositoryCommits
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.DevOps.getRepositoryCommits

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 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: 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[_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, string>
    FreeformTags Dictionary<string, string>
    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]string
    FreeformTags map[string]string
    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,String>
    freeformTags Map<String,String>
    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]: string}
    freeformTags {[key: string]: string}
    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, str]
    freeform_tags Mapping[str, str]
    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<String>
    freeformTags Map<String>
    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 v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi