Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 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[_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:
- Repository
Id string - Unique repository identifier.
- string
- A filter to return any commits that are pushed by the requested author.
- Commit
Message string - A filter to return any commits that contains the given message.
- Exclude
Ref stringName - A filter to exclude commits that match the given reference name.
- File
Path string - A filter to return only commits that affect any of the specified paths.
- Filters
List<Get
Repository Commits Filter> - Ref
Name string - A filter to return only resources that match the given reference name.
- Timestamp
Greater stringThan Or Equal To - A filter to return commits only created after the specified timestamp value.
- Timestamp
Less stringThan Or Equal To - A filter to return commits only created before the specified timestamp value.
- Repository
Id string - Unique repository identifier.
- string
- A filter to return any commits that are pushed by the requested author.
- Commit
Message string - A filter to return any commits that contains the given message.
- Exclude
Ref stringName - A filter to exclude commits that match the given reference name.
- File
Path string - A filter to return only commits that affect any of the specified paths.
- Filters
[]Get
Repository Commits Filter - Ref
Name string - A filter to return only resources that match the given reference name.
- Timestamp
Greater stringThan Or Equal To - A filter to return commits only created after the specified timestamp value.
- Timestamp
Less stringThan Or Equal To - A filter to return commits only created before the specified timestamp value.
- repository
Id String - Unique repository identifier.
- String
- A filter to return any commits that are pushed by the requested author.
- commit
Message String - A filter to return any commits that contains the given message.
- exclude
Ref StringName - A filter to exclude commits that match the given reference name.
- file
Path String - A filter to return only commits that affect any of the specified paths.
- filters
List<Get
Repository Commits Filter> - ref
Name String - A filter to return only resources that match the given reference name.
- timestamp
Greater StringThan Or Equal To - A filter to return commits only created after the specified timestamp value.
- timestamp
Less StringThan Or Equal To - A filter to return commits only created before the specified timestamp value.
- repository
Id string - Unique repository identifier.
- string
- A filter to return any commits that are pushed by the requested author.
- commit
Message string - A filter to return any commits that contains the given message.
- exclude
Ref stringName - A filter to exclude commits that match the given reference name.
- file
Path string - A filter to return only commits that affect any of the specified paths.
- filters
Get
Repository Commits Filter[] - ref
Name string - A filter to return only resources that match the given reference name.
- timestamp
Greater stringThan Or Equal To - A filter to return commits only created after the specified timestamp value.
- timestamp
Less 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[devops.
Get Repository 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.
- repository
Id String - Unique repository identifier.
- String
- A filter to return any commits that are pushed by the requested author.
- commit
Message String - A filter to return any commits that contains the given message.
- exclude
Ref StringName - A filter to exclude commits that match the given reference name.
- file
Path String - A filter to return only commits that affect any of the specified paths.
- filters List<Property Map>
- ref
Name String - A filter to return only resources that match the given reference name.
- timestamp
Greater StringThan Or Equal To - A filter to return commits only created after the specified timestamp value.
- timestamp
Less 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.
- Repository
Commit List<GetCollections Repository Commits Repository Commit Collection> - The list of repository_commit_collection.
- Repository
Id string - string
- Name of the author of the repository.
- Commit
Message string - The commit message.
- Exclude
Ref stringName - File
Path string - Filters
List<Get
Repository Commits Filter> - Ref
Name string - Timestamp
Greater stringThan Or Equal To - Timestamp
Less stringThan Or Equal To
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository
Commit []GetCollections Repository Commits Repository Commit Collection - The list of repository_commit_collection.
- Repository
Id string - string
- Name of the author of the repository.
- Commit
Message string - The commit message.
- Exclude
Ref stringName - File
Path string - Filters
[]Get
Repository Commits Filter - Ref
Name string - Timestamp
Greater stringThan Or Equal To - Timestamp
Less stringThan Or Equal To
- id String
- The provider-assigned unique ID for this managed resource.
- repository
Commit List<GetCollections Repository Commits Repository Commit Collection> - The list of repository_commit_collection.
- repository
Id String - String
- Name of the author of the repository.
- commit
Message String - The commit message.
- exclude
Ref StringName - file
Path String - filters
List<Get
Repository Commits Filter> - ref
Name String - timestamp
Greater StringThan Or Equal To - timestamp
Less StringThan Or Equal To
- id string
- The provider-assigned unique ID for this managed resource.
- repository
Commit GetCollections Repository Commits Repository Commit Collection[] - The list of repository_commit_collection.
- repository
Id string - string
- Name of the author of the repository.
- commit
Message string - The commit message.
- exclude
Ref stringName - file
Path string - filters
Get
Repository Commits Filter[] - ref
Name string - timestamp
Greater stringThan Or Equal To - timestamp
Less stringThan Or Equal To
- id str
- The provider-assigned unique ID for this managed resource.
- repository_
commit_ Sequence[devops.collections Get 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[devops.
Get Repository 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.
- repository
Commit List<Property Map>Collections - The list of repository_commit_collection.
- repository
Id String - String
- Name of the author of the repository.
- commit
Message String - The commit message.
- exclude
Ref StringName - file
Path String - filters List<Property Map>
- ref
Name String - timestamp
Greater StringThan Or Equal To - timestamp
Less 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.
- Commit
Id string - Commit hash pointed to by reference name.
- Commit
Message string - A filter to return any commits that contains the given message.
- Committer
Email string - Email of who creates the commit.
- Committer
Name string - Name of who creates the commit.
- Dictionary<string, string>
- Dictionary<string, string>
- Parent
Commit List<string>Ids - An array of parent commit IDs of created commit.
- 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
- A filter to return any commits that are pushed by the requested author.
- Commit
Id string - Commit hash pointed to by reference name.
- Commit
Message string - A filter to return any commits that contains the given message.
- Committer
Email string - Email of who creates the commit.
- Committer
Name string - Name of who creates the commit.
- map[string]string
- map[string]string
- Parent
Commit []stringIds - An array of parent commit IDs of created commit.
- 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
- A filter to return any commits that are pushed by the requested author.
- commit
Id String - Commit hash pointed to by reference name.
- commit
Message String - A filter to return any commits that contains the given message.
- committer
Email String - Email of who creates the commit.
- committer
Name String - Name of who creates the commit.
- Map<String,String>
- Map<String,String>
- parent
Commit List<String>Ids - An array of parent commit IDs of created commit.
- 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
- A filter to return any commits that are pushed by the requested author.
- commit
Id string - Commit hash pointed to by reference name.
- commit
Message string - A filter to return any commits that contains the given message.
- committer
Email string - Email of who creates the commit.
- committer
Name string - Name of who creates the commit.
- {[key: string]: string}
- {[key: string]: string}
- parent
Commit string[]Ids - An array of parent commit IDs of created commit.
- 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
- 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.
- commit
Id String - Commit hash pointed to by reference name.
- commit
Message String - A filter to return any commits that contains the given message.
- committer
Email String - Email of who creates the commit.
- committer
Name String - Name of who creates the commit.
- Map<String>
- Map<String>
- parent
Commit List<String>Ids - An array of parent commit IDs of created commit.
- 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
oci
Terraform Provider.