Commits - Get Changes
特定のコミットの変更を取得します。
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/changes?api-version=7.1
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/changes?top={top}&skip={skip}&api-version=7.1
URI パラメーター
| 名前 | / | 必須 | 型 | 説明 |
|---|---|---|---|---|
|
commit
|
path | True |
string |
コミットの ID。 |
|
organization
|
path | True |
string |
Azure DevOps 組織の名前。 |
|
repository
|
path | True |
string |
リポジトリの ID またはフレンドリ名。 フレンドリ名を使用するには、projectId も指定する必要があります。 |
|
project
|
path |
string |
プロジェクト ID またはプロジェクト名 |
|
|
api-version
|
query | True |
string |
使用する API のバージョン。 このバージョンの API を使用するには、これを '7.1' に設定する必要があります。 |
|
skip
|
query |
integer (int32) |
スキップする変更の数。 |
|
|
top
|
query |
integer (int32) |
返される変更の最大数。 |
応答
| 名前 | 型 | 説明 |
|---|---|---|
| 200 OK |
成功した操作 |
セキュリティ
oauth2
型:
oauth2
フロー:
accessCode
Authorization URL (承認 URL):
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL (トークン URL):
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
スコープ
| 名前 | 説明 |
|---|---|
| vso.code | コミット、変更セット、ブランチ、およびその他のバージョン管理成果物に関するソース コードとメタデータを読み取る機能を付与します。 また、コードを検索し、サービス フックを使用してバージョン管理イベントに関する通知を受け取る機能も付与されます。 |
例
With changes
要求のサンプル
GET https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4/changes?top=2&skip=10&api-version=7.1
応答のサンプル
{
"changeCounts": {
"Add": 456
},
"changes": [
{
"item": {
"gitObjectType": "blob",
"path": "/MyWebSite/MyWebSite/favicon.ico",
"url": "https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/items/MyWebSite/MyWebSite/favicon.ico?versionType=Commit"
},
"changeType": "add"
},
{
"item": {
"gitObjectType": "tree",
"path": "/MyWebSite/MyWebSite/fonts",
"isFolder": true,
"url": "https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/items/MyWebSite/MyWebSite/fonts?versionType=Commit"
},
"changeType": "add"
}
]
}
定義
| 名前 | 説明 |
|---|---|
|
Change |
|
|
Git |
|
|
Git |
|
|
Git |
|
|
Item |
|
|
Item |
|
|
Version |
アイテムに対して行われた変更の種類。 |
ChangeCountDictionary
GitChange
| 名前 | 型 | 説明 |
|---|---|---|
| changeId |
integer (int32) |
変更のグループ内の変更の ID。 |
| changeType |
アイテムに対して行われた変更の種類。 |
|
| item |
string (T) |
現在のバージョン。 |
| newContent |
変更後のアイテムの内容。 |
|
| newContentTemplate |
新しい変更をプッシュするときに使用する新しいコンテンツ テンプレート。 |
|
| originalPath |
string |
現在のパスと異なる場合は、アイテムの元のパス。 |
| sourceServerItem |
string |
サーバー上の項目のパス。 |
| url |
string |
アイテムを取得する URL。 |
GitCommitChanges
| 名前 | 型 | 説明 |
|---|---|---|
| changeCounts | ||
| changes |
GitTemplate
| 名前 | 型 | 説明 |
|---|---|---|
| name |
string |
テンプレートの名前 |
| type |
string |
テンプレートの種類 |
ItemContent
| 名前 | 型 | 説明 |
|---|---|---|
| content |
string |
|
| contentType |
ItemContentType
| 値 | 説明 |
|---|---|
| base64Encoded | |
| rawText |
VersionControlChangeType
アイテムに対して行われた変更の種類。
| 値 | 説明 |
|---|---|
| add | |
| all | |
| branch | |
| delete | |
| edit | |
| encoding | |
| lock | |
| merge | |
| none | |
| property | |
| rename | |
| rollback | |
| sourceRename | |
| targetRename | |
| undelete |