REST Resource: projects.locations.repositories.pullRequests

Resource: PullRequest

Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base).

JSON representation
{
  "name": string,
  "title": string,
  "body": string,
  "base": {
    object (Branch)
  },
  "head": {
    object (Branch)
  },
  "state": enum (State),
  "createTime": string,
  "updateTime": string,
  "closeTime": string
}
Fields
name

string

Output only. A unique identifier for a PullRequest. The number appended at the end is generated by the server. Format: projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_number}

title

string

Required. The pull request title.

body

string

Optional. The pull request body. Provides a detailed description of the changes.

base

object (Branch)

Required. The branch to merge changes in.

head

object (Branch)

Immutable. The branch containing the changes to be merged.

state

enum (State)

Output only. State of the pull request (open, closed or merged).

createTime

string (Timestamp format)

Output only. Creation timestamp.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. Last updated timestamp.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

closeTime

string (Timestamp format)

Output only. Close timestamp (if closed or merged). Cleared when pull request is re-opened.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Branch

Branch represents a branch involved in a pull request.

JSON representation
{
  "ref": string,
  "sha": string
}
Fields
ref

string

Required. Name of the branch.

sha

string

Output only. The commit at the tip of the branch.

State

State of the pull request.

Enums
STATE_UNSPECIFIED Unspecified.
OPEN An open pull request.
CLOSED A closed pull request.
MERGED A merged pull request.

Methods

close

Closes a pull request without merging.

create

Creates a pull request.

get

Gets a pull request.

list

Lists pull requests in a repository.

listFileDiffs

Lists a pull request's file diffs.

merge

Merges a pull request.

open

Opens a pull request.

patch

Updates a pull request.