The Commit
object type represents a commit object within a repository. atlassian:commit
should be used to
ingest commit-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 ()[Optional] ├─ type ├─ value └─ repositoryId └─ permissions └─ accessControls └─ principals └─type └─ associations [] [Optional] ├─ associationType (string) └─ values [] atlassian:commit ├─ hash (string) [Required] ├─ displayId (string) [Required] ├─ message (string) [Required] ├─ author (UserReference) [Required] ├─ accountId (string) [Optional] ├─ email (string) [Optional] ├─ externalId (string) [Optional] ├─ ari (string) [Optional] ├─ name (string) [Optional] ├─ userName (string) [Optional] ├─ avatar (string) [Optional] └─ url (string) [Optional] ├─ flags (List<string>) [Required] ├─ fileCount (integer) [Required] ├─ files (List<FileInfo>) [Required] ├─ path (string) [Required] ├─ url (string) [Required] ├─ changeType (string) [Required] ├─ linesAdded (Integer) [Required] └─ linesRemoved (Integer) [Required] └─ authorTimestamp (string) [Required]
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 |
---|---|---|---|
hash |
| Yes | The unique hash identifier for the commit. |
displayId |
| Yes | The display identifier for the commit (typically a shortened hash). |
message |
| Yes | The commit message. |
author | UserReference | Yes | Information about the commit author. |
flags | List<string> | Yes | List of flags associated with the commit. |
fileCount | integer | Yes | The total number of files changed in this commit. |
files | List<FileInfo> | Yes | List of files changed in this commit. |
files.path | string | Yes | The file path relative to repository root. |
files.url | string | Yes | The URL to view the file. |
files.changeType | string | Yes | The type of change made to the file. |
files.linesAdded | integer | Yes | The number of lines added in the file. |
files.linesRemoved | integer | Yes | The number of lines removed from the file. |
authorTimestamp | string | Yes | The timestamp when the commit was authored. Format: Instant (ISO8601 / RFC3339) |
1 2{ "objects" : [ { "id" : "repo-1", "updateSequenceNumber" : 1, "displayName" : "My repository", "description" : "My test repo", "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" : "test icon" } }, { "id" : "commit-1", "updateSequenceNumber" : 1, "displayName" : "Fixed bug 111", "description" : "SAI-123 A commit that fixes things", "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" : "user2@example.com" } ], "atlassian:commit" : { "flags" : [ "MERGE_COMMIT" ], "fileCount" : 34, "files" : [ { "path" : "a/b/c", "url" : "https://url.com/a/b/c", "changeType" : "ADDED", "linesAdded" : 23, "linesRemoved" : 0 } ] } } ], "operationType" : "NORMAL" }
Rate this page: