PullRequest

Represents a pull request

interface PullRequest {
    author: Author;
    commentCount: number;
    destinationBranch?: string;
    destinationBranchUrl?: string;
    displayId: string;
    id: string;
    issueKeys: string[];
    lastUpdate: string;
    reviewers?: Reviewer[];
    sourceBranch: string;
    sourceBranchUrl?: string;
    status:
        | "OPEN"
        | "UNKNOWN"
        | "MERGED"
        | "DECLINED";
    title: string;
    updateSequenceId: number;
    url: string;
}

Hierarchy

  • Record<string, unknown>
    • PullRequest

Properties

author: Author

Author

Describes the author of a particular entity

commentCount: number

The number of comments on the pull request

42
destinationBranch?: string

The name of destination branch of this PR. Max length is 255 characters.

master
destinationBranchUrl?: string

The url of the destination branch of this PR. Max length is 2000 characters.

https://bitbucket.org/atlassianlabs/atlassian-connect-jira-example/src/master
displayId: string

Shortened identifier for this pull request, used for display. Max length is 255 characters.

Pull request 2
id: string

The ID of this entity. Will be used for cross entity linking. Must be unique by entity type within a repository, i.e., only one commit can have ID 'X' in repository 'Y'. But adding, e.g., a branch with ID 'X' to repository 'Y' is acceptable. Only alphanumeric characters, and '~.-_', are allowed. Max length is 1024 characters

c6c7c750-cee2-48e2-b920-d7706dfd11f9
issueKeys: string[]

List of issues keys that this entity is associated with. They must be valid Jira issue keys.

[
"ISSUE-1",
"TEST-2"
]
lastUpdate: string

The most recent update to this PR. Formatted as a UTC ISO 8601 date time format.

2016-10-31T23:27:25+00:00
reviewers?: Reviewer[]

The list of reviewers of this pull request

sourceBranch: string

The name of the source branch of this PR. Max length is 255 characters.

ISSUE-1-feature-branch
sourceBranchUrl?: string

The url of the source branch of this PR. This is used to match this PR against the branch. Max length is 2000 characters.

https://bitbucket.org/atlassianlabs/atlassian-connect-jira-example/branch/ISSUE-1-feature-branch
status:
    | "OPEN"
    | "UNKNOWN"
    | "MERGED"
    | "DECLINED"

The status of the pull request. In the case of concurrent updates, priority is given in the order OPEN, MERGED, DECLINED, UNKNOWN

OPEN
title: string

Title of the pull request. Max length is 1024 characters.

Pull request 2, fixing all the issues caused by pull request #1
updateSequenceId: number

An ID used to apply an ordering to updates for this entity in the case of out-of-order receipt of update requests. This can be any monotonically increasing number. A suggested implementation is to use epoch millis from the provider system, but other alternatives are valid (e.g. a provider could store a counter against each entity and increment that on each update to Jira). Updates for an entity that are received with an updateSqeuenceId lower than what is currently stored will be ignored.

1523494301248
url: string

The URL of this pull request. Max length is 2000 characters.

https://bitbucket.org/atlassianlabs/atlassian-connect-jira-example/pull-requests/2