lib/danger/request_source/github.rb in danger-3.0.3 vs lib/danger/request_source/github.rb in danger-3.1.0
- old
+ new
@@ -62,9 +62,13 @@
self.scm.exec "branch #{EnvironmentManager.danger_head_branch} #{head_commit}"
end
def fetch_details
self.pr_json = client.pull_request(ci_source.repo_slug, ci_source.pull_request_id)
+ if self.pr_json[:message] == "Moved Permanently"
+ raise "Repo moved or renamed, make sure to update the git remote".red
+ end
+
fetch_issue_details(self.pr_json)
self.ignored_violations = ignored_violations_from_pr(self.pr_json)
end
def ignored_violations_from_pr(pr_json)