다음을 통해 공유


Pull Request Statuses - Get

ID별로 특정 끌어오기 요청 상태를 가져옵니다. 상태 ID는 모든 반복에서 끌어오기 요청 내에서 고유합니다.

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

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
organization
path True

string

Azure DevOps 조직의 이름입니다.

pullRequestId
path True

integer (int32)

끌어오기 요청의 ID입니다.

repositoryId
path True

string

끌어오기 요청의 대상 분기의 리포지토리 ID입니다.

statusId
path True

integer (int32)

끌어오기 요청 상태의 ID입니다.

project
path

string

프로젝트 ID 또는 프로젝트 이름

api-version
query True

string

사용할 API의 버전입니다. 이 버전의 API를 사용하려면 '7.1'로 설정해야 합니다.

응답

Name 형식 Description
200 OK

GitPullRequestStatus

성공한 작업

보안

oauth2

형식: oauth2
Flow: accessCode
권한 부여 URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
토큰 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

범위

Name Description
vso.code 커밋, 변경 집합, 분기 및 기타 버전 제어 아티팩트에 대한 소스 코드 및 메타데이터를 읽을 수 있는 기능을 부여합니다. 또한 코드를 검색하고 서비스 후크를 통해 버전 제어 이벤트에 대한 알림을 받을 수 있는 기능을 부여합니다.
vso.code_status 커밋 및 끌어오기 요청 상태를 읽고 쓰는 기능을 부여합니다.

예제

샘플 요청

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

샘플 응답

{
  "id": 1,
  "state": "succeeded",
  "description": "Sample status succeeded",
  "context": {
    "name": "sample-status-1",
    "genre": "vsts-samples"
  },
  "creationDate": "2017-09-19T14:50:27.4949745Z",
  "updatedDate": "2017-09-19T14:50:27.4949745Z",
  "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",
  "_links": {
    "self": {
      "href": "https://dev.azure.com/fabrikam/_apis/git/repositories/b92c8408-a0c9-4292-88af-bc005a1b8272/pullRequests/5/statuses/1"
    },
    "repository": {
      "href": "https://dev.azure.com/fabrikam/_apis/git/repositories/b92c8408-a0c9-4292-88af-bc005a1b8272"
    }
  }
}

정의

Name Description
GitPullRequestStatus

이 클래스에는 끌어오기 요청 상태를 게시하는 서비스/확장의 메타데이터가 포함됩니다. 상태는 끌어오기 요청 또는 반복과 연결할 수 있습니다.

GitStatusContext

상태를 고유하게 식별하는 상태 컨텍스트입니다.

GitStatusState

상태의 상태입니다.

IdentityRef
PropertiesCollection

클래스는 키-값 쌍의 컬렉션으로 속성 모음을 나타냅니다. DBNull 제외한 모든 기본 형식(TypeCode != TypeCode.Object있는 모든 형식)의 값이 허용됩니다. Byte[], Int32, Double, DateType 및 String 형식의 값은 해당 형식을 유지하며, 다른 기본 형식은 문자열로 다시 조정됩니다. Byte[]가 base64로 인코딩된 문자열로 필요합니다.

ReferenceLinks

REST 참조 링크의 컬렉션을 나타내는 클래스입니다.

GitPullRequestStatus

이 클래스에는 끌어오기 요청 상태를 게시하는 서비스/확장의 메타데이터가 포함됩니다. 상태는 끌어오기 요청 또는 반복과 연결할 수 있습니다.

Name 형식 Description
_links

ReferenceLinks

참조 링크입니다.

context

GitStatusContext

상태의 컨텍스트입니다.

createdBy

IdentityRef

상태를 만든 ID입니다.

creationDate

string (date-time)

상태의 생성 날짜 및 시간입니다.

description

string

상태 설명입니다. 일반적으로 상태의 현재 상태를 설명합니다.

id

integer (int32)

상태 식별자입니다.

iterationId

integer (int32)

상태를 연결할 반복의 ID입니다. 최소값은 1입니다.

properties

PropertiesCollection

상태의 사용자 지정 속성입니다.

state

GitStatusState

상태의 상태입니다.

targetUrl

string

상태 세부 정보가 포함된 URL입니다.

updatedDate

string (date-time)

상태의 마지막 업데이트 날짜 및 시간입니다.

GitStatusContext

상태를 고유하게 식별하는 상태 컨텍스트입니다.

Name 형식 Description
genre

string

상태의 장르입니다. 일반적으로 상태를 생성하는 서비스/도구의 이름은 비어 있을 수 있습니다.

name

string

상태의 이름 식별자는 null이거나 비워 둘 수 없습니다.

GitStatusState

상태의 상태입니다.

Description
error

오류가 있는 상태입니다.

failed

상태가 실패했습니다.

notApplicable

상태는 대상 개체에 적용되지 않습니다.

notSet

상태 상태가 설정되지 않았습니다. 기본 상태입니다.

pending

보류 중인 상태입니다.

succeeded

상태가 성공했습니다.

IdentityRef

Name 형식 Description
_links

ReferenceLinks

이 필드에는 그래프 제목에 대한 0개 이상의 흥미로운 링크가 포함되어 있습니다. 이러한 링크를 호출하여 이 그래프 제목에 대한 추가 관계 또는 자세한 정보를 얻을 수 있습니다.

descriptor

string

설명자는 시스템이 실행되는 동안 그래프 제목을 참조하는 기본 방법입니다. 이 필드는 계정과 조직 모두에서 동일한 그래프 제목을 고유하게 식별합니다.

directoryAlias

string

사용되지 않음 - IdentityRef "_links" 사전의 "자체" 항목에서 참조된 Graph 사용자를 쿼리하여 검색할 수 있습니다.

displayName

string

그래프 주체의 고유하지 않은 표시 이름입니다. 이 필드를 변경하려면 원본 공급자에서 해당 값을 변경해야 합니다.

id

string

imageUrl

string

사용되지 않음 - IdentityRef "_links" 사전의 "아바타" 항목에서 사용할 수 있습니다.

inactive

boolean

사용되지 않음 - GraphUser "_links" 사전의 "membershipState" 항목에서 참조되는 Graph 멤버 자격 상태를 쿼리하여 검색할 수 있습니다.

isAadIdentity

boolean

사용되지 않음 - 설명자의 주체 형식(Descriptor.IsAadUserType/Descriptor.IsAadGroupType)에서 유추할 수 있습니다.

isContainer

boolean

사용되지 않음 - 설명자의 주체 형식에서 유추할 수 있음(Descriptor.IsGroupType)

isDeletedInOrigin

boolean

profileUrl

string

사용되지 않음 - ToIdentityRef의 기존 구현에서 사용되지 않음

uniqueName

string

사용되지 않음 - 대신 Domain+PrincipalName 사용

url

string

이 URL은 이 그래프 주체의 원본 리소스에 대한 전체 경로입니다.

PropertiesCollection

클래스는 키-값 쌍의 컬렉션으로 속성 모음을 나타냅니다. DBNull 제외한 모든 기본 형식(TypeCode != TypeCode.Object있는 모든 형식)의 값이 허용됩니다. Byte[], Int32, Double, DateType 및 String 형식의 값은 해당 형식을 유지하며, 다른 기본 형식은 문자열로 다시 조정됩니다. Byte[]가 base64로 인코딩된 문자열로 필요합니다.

Name 형식 Description
count

integer (int32)

컬렉션의 속성 수입니다.

item

object

keys

string[]

컬렉션의 키 집합입니다.

values

string[]

컬렉션의 값 집합입니다.

REST 참조 링크의 컬렉션을 나타내는 클래스입니다.

Name 형식 Description
links

object

링크의 읽기 전용 보기입니다. 참조 링크는 읽기 전용이므로 읽기 전용으로만 노출하려고 합니다.