Every call of the package to the GitHub API goes through this function, so that the tests can replace it with answers of their own.
Arguments
- endpoint
The endpoint, such as
"/user"or"POST /graphql". Its placeholders take the values of the same names in....- ...
The values of the placeholders and the parameters of the request, passed to
gh::gh().- token
GitHub token, or
NULLfor the one that gh finds.
Value
The answer of GitHub, as gh::gh() returns it. An answer with an error stops with the
error of gh.