The Pull request
object type represents a pull request object within a repository. atlassian:pull-request
should be used to ingest pull request-specific fields.
1 2objects {} ├─ schemaVersion (string) [Required] ├─ id (string) [Required] ├─ updateSequenceNumber (long) [Required] ├─ displayName (string) [Required] ├─ description (string) [Optional] ├─ url (string) [Required] ├─ createdAt (Instant (ISO8601 / RFC3339)) [Required] └─ createdBy [] [Optional] ├─ accountId (string) └─ ari (string) └─ lastUpdatedAt (Instant (ISO8601 / RFC3339)) [Required] └─ lastUpdatedBy [] [Required] ├─accountId (string) └─ ari └─ containerKey ()[Required] ├─ type └─ value └─ permissions └─ accessControls └─ principals └─type └─ associations [] [Optional] ├─ associationType (string) └─ values [] atlassian:pull-request ├─ title (string) ├─ displayId (string) [Required] ├─ status (string) [Required] ├─ author (UserReference) ├─ accountId (string) [Optional] ├─ email (string) [Optional] ├─ externalId (string) [Optional] ├─ ari (string) [Optional] ├─ name (string) [Optional] ├─ userName (string) [Optional] ├─ avatar (string) [Optional] └─ url (string) [Optional] ├─ commentCount (integer) ├─ sourceBranch (string) [Required] ├─ sourceBranchUrl (string) ├─ destinationBranch (string) ├─ destinationBranchUrl (string) ├─ reviewers (List<Reviewer>) [Required] ├─ accountId (string) [Optional] ├─ id (string) [Optional] ├─ email (string) [Optional] ├─ approvalStatus (string) [Optional] ├─ name (string) [Optional] ├─ avatar (string) [Optional] ├─ url (string) [Optional] └─ ari (string) [Optional] └─ taskCount (integer)
You may send the container repository as a separate entity in the same payload or in a separate request.
Property | Type | Required | Description |
---|---|---|---|
schemaVersion |
| Yes | The schema version of the object. |
id |
| Yes | The ID of the object in the source system. |
updateSequenceNumber | long | Yes | A sequence number to compare when writing to the database. Objects are written following
a last write wins strategy, therefore an object with a greater UpdateSequenceNumber
is considered a more recently updated object. |
displayName | string | Yes | The display name of the object. |
description | string | No | The description of the object. |
url | string | Yes | The URL from the provider which the object is accessible from. |
createdAt | string | Yes |
The date the object was created. Format: Instant (ISO8601 / RFC3339) |
createdBy | user | No |
The user that created the object. See User to learn more. |
lastUpdatedAt | string | Yes |
The date the object was last updated. Format: Instant (ISO8601 / RFC3339) |
lastUpdatedBy | user | No |
The user that last updated the object. See User to learn more. |
owners | list<User> | No | List of users that own the object. |
thumbnail | thumbnail | No |
The thumbnail of the object. See Thumbnail to learn more. |
parentKey | entityKey | No |
The ID of the parent object. If null, it is a standalone object. See Entity key to learn more. |
containerKey | entityKey | Yes |
The container identifier that this object belongs to. See Entity key to learn more. |
permissions | list<Permissions> | Yes |
The permissions configuration of the object. See Permissions to learn more. |
associations | association | No |
List of objects associated with the object. Generally used to link an external object to a Atlassian object. See Association to learn more. |
Property | Type | Required | Description |
---|---|---|---|
title | string | No | The title of the pull request. |
displayId | string | Yes | The display identifier for the pull request (e.g., #123). |
status | string | Yes | The current status of the pull request. |
author | UserReference | No | The author of the pull request. |
author.accountId | string | No | The account ID of the pull request author. |
author.email | string | No | The email address of the pull request author. |
author.externalId | string | No | The external ID of the pull request author. |
author.ari | string | No | The Atlassian Resource Identifier (ARI) of the pull request author. |
author.name | string | No | The name of the pull request author. |
author.userName | string | No | The username of the pull request author. |
author.avatar | string | No | The avatar URL of the pull request author. |
author.url | string | No | The URL of the pull request author. |
commentCount | integer | No | The number of comments on the pull request. |
sourceBranch | string | Yes | The source branch being merged from. |
sourceBranchUrl | string | No | The URL of the source branch. |
destinationBranch | string | No | The destination branch being merged into. |
destinationBranchUrl | string | No | The URL of the destination branch. |
reviewers | List<Reviewer> | Yes | List of reviewers assigned to the pull request. |
reviewers.accountId | string | No | The account ID of the reviewer. |
reviewers.id | string | No | The ID of the reviewer. |
reviewers.email | string | No | The email address of the reviewer. |
reviewers.approvalStatus | string | No | The approval status of the reviewer. |
reviewers.name | string | No | The name of the reviewer. |
reviewers.avatar | string | No | The avatar URL of the reviewer. |
reviewers.url | string | No | The URL of the reviewer. |
reviewers.ari | string | No | The Atlassian Resource Identifier (ARI) of the reviewer. |
taskCount | integer | No | The number of tasks associated with the pull request. |
1 2{ "objects" : [ { "id" : "repo-1", "updateSequenceNumber" : 1, "displayName" : "My repository", "description" : "A test repository", "url" : "https://bitbucket.org/my-project/my-repo/src/master/", "lastUpdatedAt" : "2023-07-19T15:27:37.000Z", "atlassian:repository" : { "forkOf" : "repo-2", "avatar" : "avatar.png", "avatarDescription" : "An avatar" } }, { "id" : "pr-1", "updateSequenceNumber" : 1, "displayName" : "SAI-123 A PR to do things", "description" : "This Pull request does X, Y, and Z.", "url" : "https://bitbucket.org/my-project/my-repo/src/master/", "lastUpdatedAt" : "2023-07-19T15:27:37.000Z", "containerKey" : { "type" : "atlassian:repository", "value" : { "repositoryId" : "repo-1" } }, "owners" : [ { "externalId" : "external-id-1", "email" : "user4@example.com" } ], "atlassian:pull-request" : { "displayId" : "#2", "status" : "OPEN", "commentCount" : 324, "sourceBranch" : "SAI-123-sdf", "destinationBranch" : "main", "reviewers" : [ { "externalId" : "external-id-1", "email" : "user5@example.com" } ], "taskCount" : 21 } } ], "operationType" : "NORMAL" }
Rate this page: