RepositoryPullRequest

class RepositoryPullRequest : KotlinCustomResource

This resource allows you to create and manage PullRequests for repositories within your GitHub organization or personal account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = new github.RepositoryPullRequest("example", {
baseRepository: "example-repository",
baseRef: "main",
headRef: "feature-branch",
title: "My newest feature",
body: "This will change everything",
});
import pulumi
import pulumi_github as github
example = github.RepositoryPullRequest("example",
base_repository="example-repository",
base_ref="main",
head_ref="feature-branch",
title="My newest feature",
body="This will change everything")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = new Github.RepositoryPullRequest("example", new()
{
BaseRepository = "example-repository",
BaseRef = "main",
HeadRef = "feature-branch",
Title = "My newest feature",
Body = "This will change everything",
});
});
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.NewRepositoryPullRequest(ctx, "example", &github.RepositoryPullRequestArgs{
BaseRepository: pulumi.String("example-repository"),
BaseRef: pulumi.String("main"),
HeadRef: pulumi.String("feature-branch"),
Title: pulumi.String("My newest feature"),
Body: pulumi.String("This will change everything"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.RepositoryPullRequest;
import com.pulumi.github.RepositoryPullRequestArgs;
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) {
var example = new RepositoryPullRequest("example", RepositoryPullRequestArgs.builder()
.baseRepository("example-repository")
.baseRef("main")
.headRef("feature-branch")
.title("My newest feature")
.body("This will change everything")
.build());
}
}
resources:
example:
type: github:RepositoryPullRequest
properties:
baseRepository: example-repository
baseRef: main
headRef: feature-branch
title: My newest feature
body: This will change everything

Properties

Link copied to clipboard
val baseRef: Output<String>

Name of the branch serving as the base of the Pull Request.

Link copied to clipboard
val baseRepository: Output<String>

Name of the base repository to retrieve the Pull Requests from.

Link copied to clipboard
val baseSha: Output<String>

Head commit SHA of the Pull Request base.

Link copied to clipboard
val body: Output<String>?

Body of the Pull Request.

Link copied to clipboard
val draft: Output<Boolean>

Indicates Whether this Pull Request is a draft.

Link copied to clipboard
val headRef: Output<String>

Name of the branch serving as the head of the Pull Request.

Link copied to clipboard
val headSha: Output<String>

Head commit SHA of the Pull Request head.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<List<String>>

List of label names set on the Pull Request.

Link copied to clipboard

Controls whether the base repository maintainers can modify the Pull Request. Default: false.

Link copied to clipboard
val number: Output<Int>

The number of the Pull Request within the repository.

Link copied to clipboard
val openedAt: Output<Int>

Unix timestamp indicating the Pull Request creation time.

Link copied to clipboard
val openedBy: Output<String>

GitHub login of the user who opened the Pull Request.

Link copied to clipboard
val owner: Output<String>?

Owner of the repository. If not provided, the provider's default owner is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val state: Output<String>

the current Pull Request state - can be "open", "closed" or "merged".

Link copied to clipboard
val title: Output<String>

The title of the Pull Request.

Link copied to clipboard
val updatedAt: Output<Int>

The timestamp of the last Pull Request update.

Link copied to clipboard
val urn: Output<String>