Share via


Pull Request Statuses - List

pull request に関連付けられているすべての状態を取得します。

GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses?api-version=4.1-preview.1

URI パラメーター

名前 / 必須 説明
organization
path True

string

Azure DevOps 組織の名前です。

pullRequestId
path True

integer

int32

pull request の ID。

repositoryId
path True

string

pull request のターゲット ブランチのリポジトリ ID。

project
path

string

プロジェクト ID またはプロジェクト名

api-version
query True

string

使う API のバージョン。 このバージョンの API を使用するには、これを '4.1-preview.1' に設定する必要があります。

応答

名前 説明
200 OK

GitPullRequestStatus[]

正常な操作

セキュリティ

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token 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

Scopes

名前 説明
vso.code コミット、変更セット、ブランチ、およびその他のバージョン管理成果物に関するソース コードとメタデータを読み取る機能を付与します。 また、サービス フックを介してバージョン管理イベントに関する通知を受け取る機能も付与されます。
vso.code_status コミットとプル要求の状態を読み書きする機能を付与します。

Sample Request

GET https://dev.azure.com/fabrikam/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses?api-version=4.1-preview.1

Sample Response

transfer-Encoding: chunked
{
  "value": [
    {
      "id": 1,
      "state": "succeeded",
      "description": "Sample status succeeded",
      "context": {
        "name": "sample-status-2",
        "genre": "vsts-samples"
      },
      "creationDate": "2017-09-19T14:50:27.064405Z",
      "updatedDate": "2017-09-19T14:50:27.064405Z",
      "createdBy": {
        "id": "6f168adb-59d4-4fc0-be3b-fb21b939b2a6",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://dev.azure.com/fabrikam/_apis/Identities/6f168adb-59d4-4fc0-be3b-fb21b939b2a6",
        "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=6f168adb-59d4-4fc0-be3b-fb21b939b2a6"
      },
      "targetUrl": "http://fabrikam-fiber-inc.com/CI/builds/1"
    },
    {
      "id": 2,
      "state": "succeeded",
      "description": "Sample status succeeded",
      "context": {
        "name": "sample-status-4",
        "genre": "vsts-samples"
      },
      "creationDate": "2017-09-19T14:50:27.0894136Z",
      "updatedDate": "2017-09-19T14:50:27.0894136Z",
      "createdBy": {
        "id": "6f168adb-59d4-4fc0-be3b-fb21b939b2a6",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://dev.azure.com/fabrikam/_apis/Identities/6f168adb-59d4-4fc0-be3b-fb21b939b2a6",
        "imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=6f168adb-59d4-4fc0-be3b-fb21b939b2a6"
      },
      "targetUrl": "http://fabrikam-fiber-inc.com/CI/builds/1"
    }
  ],
  "count": 2
}

定義

名前 説明
GitPullRequestStatus

このクラスには、pull request 状態を投稿するサービス/拡張機能のメタデータが含まれています。 状態は、pull request またはイテレーションに関連付けることができます。

GitStatusContext

状態を一意に識別する状態コンテキスト。

GitStatusState

状態の状態。

IdentityRef
PropertiesCollection

クラスは、キーと値のペアのコレクションとしてプロパティ バッグを表します。 を除くすべてのプリミティブ型 (を持つ任意の TypeCode != TypeCode.Object型) の DBNull 値が受け入れられます。 Byte[]、Int32、Double、DateType、String 型の値は型を保持し、他のプリミティブは String として再チューニングされます。 Byte[] は base64 でエンコードされた文字列として必要です。

ReferenceLinks

REST 参照リンクのコレクションを表す クラス。

GitPullRequestStatus

このクラスには、pull request 状態を投稿するサービス/拡張機能のメタデータが含まれています。 状態は、pull request またはイテレーションに関連付けることができます。

名前 説明
_links

ReferenceLinks

参照リンク。

context

GitStatusContext

状態のコンテキスト。

createdBy

IdentityRef

状態を作成した ID。

creationDate

string

状態の作成日時。

description

string

状態の説明。 通常、状態の現在の状態について説明します。

id

integer

状態識別子。

iterationId

integer

状態を関連付けるイテレーションの ID。 最大値は 1 です。

properties

PropertiesCollection

状態のカスタム プロパティ。

state

GitStatusState

状態の状態。

targetUrl

string

状態の詳細を含む URL。

updatedDate

string

状態の最終更新日時。

GitStatusContext

状態を一意に識別する状態コンテキスト。

名前 説明
genre

string

状態のジャンル。 通常、状態を生成するサービスまたはツールの名前は空にすることができます。

name

string

状態の名前識別子を null または空にすることはできません。

GitStatusState

状態の状態。

名前 説明
error

string

エラーが発生した状態。

failed

string

状態が失敗しました。

notApplicable

string

状態はターゲット オブジェクトには適用されません。

notSet

string

状態の状態が設定されていません。 既定の状態です。

pending

string

状態は保留中です。

succeeded

string

状態が成功しました。

IdentityRef

名前 説明
_links

ReferenceLinks

このフィールドには、グラフの件名に関する 0 個以上の興味深いリンクが含まれています。 これらのリンクを呼び出して、このグラフの主題に関する追加のリレーションシップや詳細情報を取得できます。

descriptor

string

記述子は、システムの実行中にグラフの件名を参照する主な方法です。 このフィールドは、アカウントと組織の両方で同じグラフの件名を一意に識別します。

directoryAlias

string

displayName

string

これは、グラフの件名の一意でない表示名です。 このフィールドを変更するには、ソース プロバイダーでその値を変更する必要があります。

id

string

imageUrl

string

inactive

boolean

isAadIdentity

boolean

isContainer

boolean

profileUrl

string

uniqueName

string

url

string

この URL は、このグラフの件名のソース リソースへの完全なルートです。

PropertiesCollection

クラスは、キーと値のペアのコレクションとしてプロパティ バッグを表します。 を除くすべてのプリミティブ型 (を持つ任意の TypeCode != TypeCode.Object型) の DBNull 値が受け入れられます。 Byte[]、Int32、Double、DateType、String 型の値は型を保持し、他のプリミティブは String として再チューニングされます。 Byte[] は base64 でエンコードされた文字列として必要です。

名前 説明
count

integer

コレクション内のプロパティの数。

item

object

keys

string[]

コレクション内のキーのセット。

values

string[]

コレクション内の値のセット。

REST 参照リンクのコレクションを表す クラス。

名前 説明
links

object

リンクの読み取り時ビュー。 参照リンクは読み取り専用であるため、参照リンクは読み取り専用として公開する必要があります。