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

Function NewTemplateManager

pkg/cmd/pr/shared/templates.go:144–154  ·  view source on GitHub ↗
(httpClient *http.Client, repo ghrepo.Interface, p iprompter, dir string, allowFS bool, isPR bool)

Source from the content-addressed store, hash-verified

142}
143
144func NewTemplateManager(httpClient *http.Client, repo ghrepo.Interface, p iprompter, dir string, allowFS bool, isPR bool) *templateManager {
145 return &templateManager{
146 repo: repo,
147 rootDir: dir,
148 allowFS: allowFS,
149 isPR: isPR,
150 httpClient: httpClient,
151 prompter: p,
152 detector: fd.NewCachedDetector(httpClient, repo.RepoHost(), time.Hour*24),
153 }
154}
155
156func (m *templateManager) hasAPI() (bool, error) {
157 if !m.isPR {

Callers 1

createRunFunction · 0.92

Calls 1

RepoHostMethod · 0.65

Tested by

no test coverage detected