JDBC Driver for Bitbucket

Build 24.0.9062

PullRequestComments

Comments on pull requests in a repository.

Table Specific Information

Select

By default, the driver does not fetch deleted records unless specified in the query or if the IncludeDeleted property is set to true.

The 本製品 uses the Bitbucket API to process WHERE clause conditions built with the below columns. Filtering on other columns is processed client-side within the 本製品.

  • Id
  • CreatedOn
  • UpdatedOn
  • UserUUID
  • IssueId
  • Deleted
  • PullRequestId

The 本製品 uses the Bitbucket API to process ORDER BY clause conditions built with the below columns. Sorting on other columns is processed client-side within the 本製品.

  • Id
  • CreatedOn
  • UpdatedOn
  • ContentRaw
  • UserUUID
  • Deleted

For example, the following query is processed server side:

SELECT * FROM PullRequestComments WHERE PullRequestId=6 AND Id=490729955

Insert

At minimum, the ContentRaw and PullRequestId fields must be specified to create a new pull request comment. Optionally, the ParentId and ResolutionPending fields can also be specified.

To post a reply to an existing comment, set the ParentId field to the Id of the comment to which you are replying.

Sample INSERTs are included below:

Insert INTO PullRequestComments (ContentRaw, PullRequestId) VALUES ('Hello', 7)

Insert into PullRequestComments (ContentRaw, ParentId, PullRequestId) values ('Replying', 460798420, 7)

Update

A sample UPDATE is included below:
UPDATE PullRequestComments SET ContentRaw='true' WHERE Id=460798420

Delete

The API does not allow comments to be fully removed, as removing a comment with replies would damage the integrity of the original comment tree. Instead, the API handles deleting a comment by removing its content and setting its Deleted field to true.

A sample DELETE is included below:

DELETE FROM PullRequestComments WHERE Id=460798420

GetDeleted

This can be used to retrieve the IDs of deleted comments. The PullRequestId must be specified, and the query can be filtered on the Id or UpdatedOn fields.

Sample GETDELETEDs are included below:

GETDETETED FROM PullRequestComments WHERE PullRequestId=2

GETDETETED FROM PullRequestComments WHERE PullRequestId=2 AND Id = 495164026

GETDETETED FROM PullRequestComments WHERE PullRequestId=2 AND UpdatedOn > '2024-01-01'

Columns

Name Type ReadOnly References Description
Id [KEY] Int True

Id of the pull request comment.

CreatedOn Datetime True

When the comment was created.

UpdatedOn Datetime True

When the comment was updated.

ContentRaw String False

The text as it was typed by a user.

ContentMarkup String True

The type of markup language in which the raw content will be interpreted.

ContentHTML String True

The pull request's content rendered as HTML.

UserUUID String True

The account uuid of the person who made the comment.

UserName String True

The account display name of the person who made the comment.

Deleted Bool True

Whether the comment has been deleted.

ParentId Int False

The id of the parent comment.

Pending Bool False

Whether the resolution is pending.

PullRequestId [KEY] Int True

The id of the PR to which the comment is attached.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9062