GitHub v6.3.2 published on Friday, Oct 11, 2024 by Pulumi
github.getRepositoryPullRequest
Explore with Pulumi AI
Use this data source to retrieve information about a specific GitHub Pull Request in a repository.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = github.getRepositoryPullRequest({
baseRepository: "example_repository",
number: 1,
});
import pulumi
import pulumi_github as github
example = github.get_repository_pull_request(base_repository="example_repository",
number=1)
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := github.LookupRepositoryPullRequest(ctx, &github.LookupRepositoryPullRequestArgs{
BaseRepository: "example_repository",
Number: 1,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = Github.GetRepositoryPullRequest.Invoke(new()
{
BaseRepository = "example_repository",
Number = 1,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetRepositoryPullRequestArgs;
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 example = GithubFunctions.getRepositoryPullRequest(GetRepositoryPullRequestArgs.builder()
.baseRepository("example_repository")
.number(1)
.build());
}
}
variables:
example:
fn::invoke:
Function: github:getRepositoryPullRequest
Arguments:
baseRepository: example_repository
number: 1
Using getRepositoryPullRequest
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 getRepositoryPullRequest(args: GetRepositoryPullRequestArgs, opts?: InvokeOptions): Promise<GetRepositoryPullRequestResult>
function getRepositoryPullRequestOutput(args: GetRepositoryPullRequestOutputArgs, opts?: InvokeOptions): Output<GetRepositoryPullRequestResult>
def get_repository_pull_request(base_repository: Optional[str] = None,
number: Optional[int] = None,
owner: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRepositoryPullRequestResult
def get_repository_pull_request_output(base_repository: Optional[pulumi.Input[str]] = None,
number: Optional[pulumi.Input[int]] = None,
owner: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryPullRequestResult]
func LookupRepositoryPullRequest(ctx *Context, args *LookupRepositoryPullRequestArgs, opts ...InvokeOption) (*LookupRepositoryPullRequestResult, error)
func LookupRepositoryPullRequestOutput(ctx *Context, args *LookupRepositoryPullRequestOutputArgs, opts ...InvokeOption) LookupRepositoryPullRequestResultOutput
> Note: This function is named LookupRepositoryPullRequest
in the Go SDK.
public static class GetRepositoryPullRequest
{
public static Task<GetRepositoryPullRequestResult> InvokeAsync(GetRepositoryPullRequestArgs args, InvokeOptions? opts = null)
public static Output<GetRepositoryPullRequestResult> Invoke(GetRepositoryPullRequestInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRepositoryPullRequestResult> getRepositoryPullRequest(GetRepositoryPullRequestArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: github:index/getRepositoryPullRequest:getRepositoryPullRequest
arguments:
# arguments dictionary
The following arguments are supported:
- Base
Repository string - Name of the base repository to retrieve the Pull Request from.
- Number int
- The number of the Pull Request within the repository.
- Owner string
- Owner of the repository. If not provided, the provider's default owner is used.
- Base
Repository string - Name of the base repository to retrieve the Pull Request from.
- Number int
- The number of the Pull Request within the repository.
- Owner string
- Owner of the repository. If not provided, the provider's default owner is used.
- base
Repository String - Name of the base repository to retrieve the Pull Request from.
- number Integer
- The number of the Pull Request within the repository.
- owner String
- Owner of the repository. If not provided, the provider's default owner is used.
- base
Repository string - Name of the base repository to retrieve the Pull Request from.
- number number
- The number of the Pull Request within the repository.
- owner string
- Owner of the repository. If not provided, the provider's default owner is used.
- base_
repository str - Name of the base repository to retrieve the Pull Request from.
- number int
- The number of the Pull Request within the repository.
- owner str
- Owner of the repository. If not provided, the provider's default owner is used.
- base
Repository String - Name of the base repository to retrieve the Pull Request from.
- number Number
- The number of the Pull Request within the repository.
- owner String
- Owner of the repository. If not provided, the provider's default owner is used.
getRepositoryPullRequest Result
The following output properties are available:
- Base
Ref string - Name of the ref (branch) of the Pull Request base.
- Base
Repository string - Base
Sha string - Head commit SHA of the Pull Request base.
- Body string
- Body of the Pull Request.
- Draft bool
- Indicates Whether this Pull Request is a draft.
- Head
Owner string - Owner of the Pull Request head repository.
- Head
Ref string - Head
Repository string - Name of the Pull Request head repository.
- Head
Sha string - Head commit SHA of the Pull Request head.
- Id string
- The provider-assigned unique ID for this managed resource.
- Labels List<string>
- List of label names set on the Pull Request.
- Maintainer
Can boolModify - Indicates whether the base repository maintainers can modify the Pull Request.
- Number int
- Opened
At int - Unix timestamp indicating the Pull Request creation time.
- Opened
By string - GitHub login of the user who opened the Pull Request.
- State string
- the current Pull Request state - can be "open", "closed" or "merged".
- Title string
- The title of the Pull Request.
- Updated
At int - The timestamp of the last Pull Request update.
- Owner string
- Base
Ref string - Name of the ref (branch) of the Pull Request base.
- Base
Repository string - Base
Sha string - Head commit SHA of the Pull Request base.
- Body string
- Body of the Pull Request.
- Draft bool
- Indicates Whether this Pull Request is a draft.
- Head
Owner string - Owner of the Pull Request head repository.
- Head
Ref string - Head
Repository string - Name of the Pull Request head repository.
- Head
Sha string - Head commit SHA of the Pull Request head.
- Id string
- The provider-assigned unique ID for this managed resource.
- Labels []string
- List of label names set on the Pull Request.
- Maintainer
Can boolModify - Indicates whether the base repository maintainers can modify the Pull Request.
- Number int
- Opened
At int - Unix timestamp indicating the Pull Request creation time.
- Opened
By string - GitHub login of the user who opened the Pull Request.
- State string
- the current Pull Request state - can be "open", "closed" or "merged".
- Title string
- The title of the Pull Request.
- Updated
At int - The timestamp of the last Pull Request update.
- Owner string
- base
Ref String - Name of the ref (branch) of the Pull Request base.
- base
Repository String - base
Sha String - Head commit SHA of the Pull Request base.
- body String
- Body of the Pull Request.
- draft Boolean
- Indicates Whether this Pull Request is a draft.
- head
Owner String - Owner of the Pull Request head repository.
- head
Ref String - head
Repository String - Name of the Pull Request head repository.
- head
Sha String - Head commit SHA of the Pull Request head.
- id String
- The provider-assigned unique ID for this managed resource.
- labels List<String>
- List of label names set on the Pull Request.
- maintainer
Can BooleanModify - Indicates whether the base repository maintainers can modify the Pull Request.
- number Integer
- opened
At Integer - Unix timestamp indicating the Pull Request creation time.
- opened
By String - GitHub login of the user who opened the Pull Request.
- state String
- the current Pull Request state - can be "open", "closed" or "merged".
- title String
- The title of the Pull Request.
- updated
At Integer - The timestamp of the last Pull Request update.
- owner String
- base
Ref string - Name of the ref (branch) of the Pull Request base.
- base
Repository string - base
Sha string - Head commit SHA of the Pull Request base.
- body string
- Body of the Pull Request.
- draft boolean
- Indicates Whether this Pull Request is a draft.
- head
Owner string - Owner of the Pull Request head repository.
- head
Ref string - head
Repository string - Name of the Pull Request head repository.
- head
Sha string - Head commit SHA of the Pull Request head.
- id string
- The provider-assigned unique ID for this managed resource.
- labels string[]
- List of label names set on the Pull Request.
- maintainer
Can booleanModify - Indicates whether the base repository maintainers can modify the Pull Request.
- number number
- opened
At number - Unix timestamp indicating the Pull Request creation time.
- opened
By string - GitHub login of the user who opened the Pull Request.
- state string
- the current Pull Request state - can be "open", "closed" or "merged".
- title string
- The title of the Pull Request.
- updated
At number - The timestamp of the last Pull Request update.
- owner string
- base_
ref str - Name of the ref (branch) of the Pull Request base.
- base_
repository str - base_
sha str - Head commit SHA of the Pull Request base.
- body str
- Body of the Pull Request.
- draft bool
- Indicates Whether this Pull Request is a draft.
- head_
owner str - Owner of the Pull Request head repository.
- head_
ref str - head_
repository str - Name of the Pull Request head repository.
- head_
sha str - Head commit SHA of the Pull Request head.
- id str
- The provider-assigned unique ID for this managed resource.
- labels Sequence[str]
- List of label names set on the Pull Request.
- maintainer_
can_ boolmodify - Indicates whether the base repository maintainers can modify the Pull Request.
- number int
- opened_
at int - Unix timestamp indicating the Pull Request creation time.
- opened_
by str - GitHub login of the user who opened the Pull Request.
- state str
- the current Pull Request state - can be "open", "closed" or "merged".
- title str
- The title of the Pull Request.
- updated_
at int - The timestamp of the last Pull Request update.
- owner str
- base
Ref String - Name of the ref (branch) of the Pull Request base.
- base
Repository String - base
Sha String - Head commit SHA of the Pull Request base.
- body String
- Body of the Pull Request.
- draft Boolean
- Indicates Whether this Pull Request is a draft.
- head
Owner String - Owner of the Pull Request head repository.
- head
Ref String - head
Repository String - Name of the Pull Request head repository.
- head
Sha String - Head commit SHA of the Pull Request head.
- id String
- The provider-assigned unique ID for this managed resource.
- labels List<String>
- List of label names set on the Pull Request.
- maintainer
Can BooleanModify - Indicates whether the base repository maintainers can modify the Pull Request.
- number Number
- opened
At Number - Unix timestamp indicating the Pull Request creation time.
- opened
By String - GitHub login of the user who opened the Pull Request.
- state String
- the current Pull Request state - can be "open", "closed" or "merged".
- title String
- The title of the Pull Request.
- updated
At Number - The timestamp of the last Pull Request update.
- owner String
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
github
Terraform Provider.