From b7929682d2bf82babaa6a5e4ddbf8dac162871a1 Mon Sep 17 00:00:00 2001 From: Ashwanth Kumar Date: Fri, 11 Sep 2020 19:20:31 +0530 Subject: [PATCH] Not failing when PR Status fails, instead we just don't populate the PR details --- .../gocd/github/provider/gitlab/GitLabProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/in/ashwanthkumar/gocd/github/provider/gitlab/GitLabProvider.java b/src/main/java/in/ashwanthkumar/gocd/github/provider/gitlab/GitLabProvider.java index 46c88a0..fd31af0 100644 --- a/src/main/java/in/ashwanthkumar/gocd/github/provider/gitlab/GitLabProvider.java +++ b/src/main/java/in/ashwanthkumar/gocd/github/provider/gitlab/GitLabProvider.java @@ -120,9 +120,10 @@ private PullRequestStatus getPullRequestStatus(GitConfig gitConfig, String prId, MergeRequest currentPR = pullRequestFrom(gitConfig, Integer.parseInt(prId)); return transformMergeRequestToPullRequestStatus(prSHA).apply(currentPR); } catch (Exception e) { + // ignore LOG.error(String.format("Failed to fetch PR status. %s", e.getMessage()), e); - throw new RuntimeException(String.format("Failed to fetch PR status. %s", e.getMessage()), e); } + return null; } private MergeRequest pullRequestFrom(GitConfig gitConfig, int currentPullRequestID) throws GitLabApiException {