Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a facade for all Github HTTP interactions #578
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
nateberkopec
Jul 3, 2017
Collaborator
I.e. the only place we should be rescuing from Githubbub::RequestError is in the facade object. One has already been started in GithubFetcher, but it needs to be fleshed out.
As an example, here's what populate_docs! would look like with a proper remote facade:
def fetcher
@fetcher ||= GithubFetcher.new(full_name)
end
def populate_docs!
return unless can_doctor_docs?
self.update!(commit_sha: fetcher.commit_sha) # Should never raise Githubbub::RequestError
parser = Repo::CLASS_FOR_DOC_LANGUAGE[self.language].new(fetcher.clone) # ditto, but deal with the nil case here too
parser.process
parser.store(self)
end|
I.e. the only place we should be rescuing from Githubbub::RequestError is in the facade object. One has already been started in As an example, here's what def fetcher
@fetcher ||= GithubFetcher.new(full_name)
end
def populate_docs!
return unless can_doctor_docs?
self.update!(commit_sha: fetcher.commit_sha) # Should never raise Githubbub::RequestError
parser = Repo::CLASS_FOR_DOC_LANGUAGE[self.language].new(fetcher.clone) # ditto, but deal with the nil case here too
parser.process
parser.store(self)
end |
nateberkopec
added
the
help wanted
label
Jul 3, 2017
added a commit
to DavidRagone/codetriage
that referenced
this issue
Jul 7, 2017
added a commit
to DavidRagone/codetriage
that referenced
this issue
Jul 7, 2017
DavidRagone
referenced this issue
Jul 7, 2017
Merged
Add a facade for all Github HTTP interactions #590
schneems
closed this
in
#590
Jul 24, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nateberkopec commentedJul 3, 2017
•
edited
Edited 1 time
-
nateberkopec
edited Jul 3, 2017 (most recent)
Githubbub stuff kind of litters the codebase r/n. There should be a Remote Facade.