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

Method UploadTarget

pkg/cmd/issue/artifact/client/client.go:73–83  ·  view source on GitHub ↗
(repo ghrepo.Interface, number int)

Source from the content-addressed store, hash-verified

71}
72
73func (c *artifactClient) UploadTarget(repo ghrepo.Interface, number int) (*UploadTarget, error) {
74 issue, err := issueShared.FindIssueOrPR(c.httpClient, repo, number, []string{"number", "repository"})
75 if err != nil {
76 return nil, err
77 }
78 return &UploadTarget{
79 IsPullRequest: issue.IsPullRequest(),
80 RepositoryID: issue.RepositoryDatabaseID(),
81 ViewerPermission: issue.RepositoryViewerPermission(),
82 }, nil
83}
84
85// List requests pages until one comes back short or the limit is reached.
86// Every request asks for the same page size, so the page numbers line up.

Callers

nothing calls this directly

Calls 3

IsPullRequestMethod · 0.65
RepositoryDatabaseIDMethod · 0.65

Tested by

no test coverage detected