MCPcopy Create free account
hub / github.com/cli/cli / NewArtifactClient

Function NewArtifactClient

pkg/cmd/issue/artifact/client/client.go:58–63  ·  view source on GitHub ↗

NewArtifactClient returns an ArtifactClient that sends its requests through httpClient.

(httpClient *http.Client)

Source from the content-addressed store, hash-verified

56// NewArtifactClient returns an ArtifactClient that sends its requests through
57// httpClient.
58func NewArtifactClient(httpClient *http.Client) ArtifactClient {
59 return &artifactClient{
60 httpClient: httpClient,
61 apiClient: api.NewClientFromHTTP(httpClient),
62 }
63}
64
65func (c *artifactClient) IsPullRequest(repo ghrepo.Interface, number int) (bool, error) {
66 issue, err := issueShared.FindIssueOrPR(c.httpClient, repo, number, []string{"number"})

Callers 8

ClientFuncFunction · 0.92
TestIsPullRequestFunction · 0.85
TestUploadTargetFunction · 0.85
TestListFunction · 0.85
TestGetFunction · 0.85
TestDeleteFunction · 0.85
TestCreateFunction · 0.85
TestUpdateFunction · 0.85

Calls 1

NewClientFromHTTPFunction · 0.92

Tested by 7

TestIsPullRequestFunction · 0.68
TestUploadTargetFunction · 0.68
TestListFunction · 0.68
TestGetFunction · 0.68
TestDeleteFunction · 0.68
TestCreateFunction · 0.68
TestUpdateFunction · 0.68