a couple more spots we need a more forgiving approach

a couple more spots we need a more forgiving approach

From b857041fcb829cbb8764e95bc85878d37f7101a4 Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Tue, 27 Nov 2018 20:35:33 +1100
Subject: [PATCH] a couple more spots we need a more forgiving approach


diff --git a/lib/discourse_code_review/github_repo.rb b/lib/discourse_code_review/github_repo.rb
index 5d6d00e..3a171eb 100644
--- a/lib/discourse_code_review/github_repo.rb
+++ b/lib/discourse_code_review/github_repo.rb
@@ -43,7 +43,7 @@ module DiscourseCodeReview
 
     def commit_comments(page = nil)
       # TODO add a distributed lock here
-      git("checkout -f master")
+      git("checkout -f master", raise_error: false)
       git("pull")
 
       page ||= current_comment_page
@@ -93,7 +93,7 @@ module DiscourseCodeReview
     end
 
     def commits_since(hash = nil)
-      git("checkout -f master")
+      git("checkout -f master", raise_error: false)
       git("pull")
 
       hash ||= last_commit

GitHub

1 Like