Issue VCS Changes
This resource lets you work with the VCS changes linked to an issue.
Resource |
|
---|---|
Returned entity | VcsChange. For the description of the entity attributes, see Supported Fields section. |
Supported methods |
|
Represents a VCS change linked to an issue.
Below you can find the list of resources that let you work with this entity.
Issue VCS Changes
This table describes attributes of the VcsChange
entity.
To receive an attribute in the response from the server, specify it explicitly in the
fields
request parameter.To update an attribute, provide it in the body of a POST request.
Field | Type | Description |
---|---|---|
id | String | The database ID of the VCS change. |
date | Long | The date when the VCS change was committed to the repository. |
fetched | Long | The date when the VCS change was fetched from the repository to YouTrack. |
files | Int | The number of files included into the VCS change. Equals -1 if the number of files is unknown. |
author | The author of the VCS change. | |
processors | The list of version control systems that contain the VCS change. | |
text | String | The commit message of the VCS change. |
urls | Array of Strings | The list of links to the VCS change in the corresponding version control systems. The order is the same as in the |
version | String | The commit hash of the VCS change. |
issue | The YouTrack issue the VCS change is linked to. | |
state | Byte | The code of the state of the VCS change. Here is the list of available state codes:
The list of state codes may be extended in the future API versions. |
Get all accessible VCS changes linked to the specific issue.
Requires:
Read access to the issue.
Group membership in one of the groups in the "VCS changes visibility" setting in the VCS integration settings.
GET /api/issues/{issueID}/vcsChanges?{fields}&{$top}&{$skip}
null | Database ID of VcsChange |
---|
Parameter | Type | Description |
---|---|---|
fields | String | A list of VcsChange attributes that should be returned in the response. If no field is specified, only the |
$skip | Int | Optional. Lets you set a number of returned entities to skip before returning the first one. |
$top | Int | Optional. Lets you specify the maximum number of entries that are returned in the response. If you don't set the $top value, the server limits the maximum number of returned entries. The server returns a maximum of 42 entries for most resources that return collections. For more information, see Pagination. |
https://example.youtrack.cloud/api/issues/NP-5/vcsChanges?fields=id,date,fetched,files,author(login),text,version,state
[
{
"version": "4f193a6de41c65245a3a044f568604137f1ecc09",
"date": 1495443753000,
"state": 0,
"files": -1,
"author": {
"login": "jane.doe",
"$type": "User"
},
"fetched": null,
"text": "#NP-5 In Progress",
"id": "127-3",
"$type": "VcsChange"
},
{
"version": "22bce6953b1b63c18c333efbd245a4382326b95d",
"date": 1495443805000,
"state": 2,
"files": -1,
"author": {
"login": "jane.doe",
"$type": "User"
},
"fetched": null,
"text": " #NP-5 Open",
"id": "127-4",
"$type": "VcsChange"
},
{
"version": "8174a198e670d36a649f3b4a12ab55ac88c78f71",
"date": 1564484957000,
"state": 1,
"files": -1,
"author": {
"login": "system_user@iSoHnНAu9X",
"$type": "VcsUnresolvedUser"
},
"fetched": 1640085901059,
"text": "Update \n\n#NP-5 fix the issue",
"id": "127-23",
"$type": "VcsChange"
}
]
Link a new VCS change to an issue with a specific ID.
Required fields: version
, state
.
Requires permissions: Update Issue Private Fields
POST /api/issues/{issueID}/vcsChanges?{fields}&{muteUpdateNotifications}
null | Database ID of VcsChange |
---|
Parameter | Type | Description |
---|---|---|
fields | String | A list of VcsChange attributes that should be returned in the response. If no field is specified, only the |
muteUpdateNotifications | Boolean | Set this parameter to |
https://example.youtrack.cloud/api/issues/NP-5/vcsChanges?fields=id,date,fetched,files,author(login),text,version,state
{
"version": "03e876865ba4388205ac11788c6595f5ba8387a4",
"state": 1
}
{
"version": "03e876865ba4388205ac11788c6595f5ba8387a4",
"date": 1642167090000,
"state": 1,
"files": -1,
"author": {
"login": "jane.doe",
"$type": "User"
},
"fetched": 1642167188839,
"text": "Update Test.txt",
"id": "127-27",
"$type": "VcsChange"
}