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 }