CommitComments
Comments on commits.
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 add-in uses the Bitbucket API to process WHERE clause conditions built with the below columns. Filtering on other columns is processed client-side within the add-in.
- Id
- CreatedOn
- UpdatedOn
- Deleted
- CommitHash
The add-in 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 add-in.
- Id
- CreatedOn
- UpdatedOn
- ContentRaw
- UserUUID
- Deleted
- ParentId
For example, the following query is processed server side:
SELECT * FROM CommitComments WHERE CommitHash='a391205bc3fed4247e18f7abc788593b4e212562' AND Id=15161214
Insert
The ContentRaw and CommitHash fields must be specified to create a new commit comment. You can also, optionally, specify the ParentId field
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 CommitComments (ContentRaw, CommitHash) VALUES ('Hello', 'a391205bc3fed4247e18f7abc788593b4e212562') INSERT INTO CommitComments (ContentRaw, ParentId, CommitHash) VALUES ('Replying', 14716589, 'a391205bc3fed4247e18f7abc788593b4e212562')
Update
Only the ContentRaw can be modified.A sample UPDATE is included below:
UPDATE CommitComments SET ContentRaw='zyxxyz' WHERE CommitHash = 'd2e5367a98fc1d085172ee78f4b41ea2663d35e1' AND ContentRaw = 'abcd'");
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:
DETETE FROM CommitComments WHERE CommitHash = 'd2e5367a98fc1d085172ee78f4b41ea2663d35e1' AND ContentRaw = 'zyxxyz'
GetDeleted
This can be used to retrieve the IDs of deleted comments. The CommitHash must be specified, and the query can be filtered on the Id or UpdatedOn fields.Sample GETDELETEDs are included below:
GETDETETED FROM CommitComments WHERE CommitHash = 'd2e5367a98fc1d085172ee78f4b41ea2663d35e1' GETDETETED FROM CommitComments WHERE CommitHash = 'd2e5367a98fc1d085172ee78f4b41ea2663d35e1' AND Id = 15146904 GETDETETED FROM CommitComments WHERE CommitHash = 'd2e5367a98fc1d085172ee78f4b41ea2663d35e1' AND UpdatedOn > '2024-01-01'
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | Int | True |
Id of the commit 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 commit'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. | |
CommitHash [KEY] | String | True |
The hash of the commit to which the comment is attached. |