From c965d3400216fede9098c080201142709811c4c6 Mon Sep 17 00:00:00 2001 From: Fraser Davidson Date: Tue, 31 Oct 2023 14:59:32 +0000 Subject: [PATCH] WIP --- azuredevops/pull_request.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azuredevops/pull_request.go b/azuredevops/pull_request.go index 46b18ab..bf58a03 100644 --- a/azuredevops/pull_request.go +++ b/azuredevops/pull_request.go @@ -53,6 +53,10 @@ func (a *AzureDevOps) FindPullRequest(projectName string, repositoryName string, return nil, err } + if len(*pullRequests) == 0 { + return nil, nil + } + return &(*pullRequests)[0], nil }