From 2870df497b012dbe56062a114c61ca2d1c176e7a Mon Sep 17 00:00:00 2001 From: yueluhuan Date: Tue, 5 Sep 2023 06:16:00 +0000 Subject: [PATCH 1/3] fix response to return valid value --- azuredevops/git/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azuredevops/git/client.go b/azuredevops/git/client.go index 7321f903..d3a0c3c3 100644 --- a/azuredevops/git/client.go +++ b/azuredevops/git/client.go @@ -3873,7 +3873,7 @@ func (client *ClientImpl) GetPullRequestProperties(ctx context.Context, args Get } var responseValue interface{} - err = client.Client.UnmarshalBody(resp, responseValue) + err = client.Client.UnmarshalCollectionBody(resp, &responseValue) return responseValue, err } From b030a68c30ea990fc2df3c8eed1e5cd7b3952cf0 Mon Sep 17 00:00:00 2001 From: yueluhuan Date: Tue, 5 Sep 2023 07:15:50 +0000 Subject: [PATCH 2/3] fix v6 and v7 --- azuredevops/v6/git/client.go | 2 +- azuredevops/v7/git/client.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azuredevops/v6/git/client.go b/azuredevops/v6/git/client.go index 31fd67db..7bc27f8c 100644 --- a/azuredevops/v6/git/client.go +++ b/azuredevops/v6/git/client.go @@ -3933,7 +3933,7 @@ func (client *ClientImpl) GetPullRequestProperties(ctx context.Context, args Get } var responseValue interface{} - err = client.Client.UnmarshalBody(resp, responseValue) + err = client.Client.UnmarshalCollectionBody(resp, &responseValue) return responseValue, err } diff --git a/azuredevops/v7/git/client.go b/azuredevops/v7/git/client.go index aaca5541..da28b3c5 100644 --- a/azuredevops/v7/git/client.go +++ b/azuredevops/v7/git/client.go @@ -3973,7 +3973,7 @@ func (client *ClientImpl) GetPullRequestProperties(ctx context.Context, args Get } var responseValue interface{} - err = client.Client.UnmarshalBody(resp, responseValue) + err = client.Client.UnmarshalCollectionBody(resp, &responseValue) return responseValue, err } From c508c339be2f59b62e04fddd363a279bc3079501 Mon Sep 17 00:00:00 2001 From: yueluhuan Date: Thu, 14 Sep 2023 11:14:28 +0000 Subject: [PATCH 3/3] switch to use UnmarshalBody function --- azuredevops/git/client.go | 2 +- azuredevops/v6/git/client.go | 2 +- azuredevops/v7/git/client.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azuredevops/git/client.go b/azuredevops/git/client.go index d3a0c3c3..3d6e0811 100644 --- a/azuredevops/git/client.go +++ b/azuredevops/git/client.go @@ -3873,7 +3873,7 @@ func (client *ClientImpl) GetPullRequestProperties(ctx context.Context, args Get } var responseValue interface{} - err = client.Client.UnmarshalCollectionBody(resp, &responseValue) + err = client.Client.UnmarshalBody(resp, &responseValue) return responseValue, err } diff --git a/azuredevops/v6/git/client.go b/azuredevops/v6/git/client.go index 7bc27f8c..190827d9 100644 --- a/azuredevops/v6/git/client.go +++ b/azuredevops/v6/git/client.go @@ -3933,7 +3933,7 @@ func (client *ClientImpl) GetPullRequestProperties(ctx context.Context, args Get } var responseValue interface{} - err = client.Client.UnmarshalCollectionBody(resp, &responseValue) + err = client.Client.UnmarshalBody(resp, &responseValue) return responseValue, err } diff --git a/azuredevops/v7/git/client.go b/azuredevops/v7/git/client.go index da28b3c5..c1ca969c 100644 --- a/azuredevops/v7/git/client.go +++ b/azuredevops/v7/git/client.go @@ -3973,7 +3973,7 @@ func (client *ClientImpl) GetPullRequestProperties(ctx context.Context, args Get } var responseValue interface{} - err = client.Client.UnmarshalCollectionBody(resp, &responseValue) + err = client.Client.UnmarshalBody(resp, &responseValue) return responseValue, err }