MCPcopy Create free account
hub / github.com/buildpacks/pack / CreateGithubIssue

Function CreateGithubIssue

internal/registry/github.go:21–48  ·  view source on GitHub ↗
(b Buildpack)

Source from the content-addressed store, hash-verified

19}
20
21func CreateGithubIssue(b Buildpack) (GithubIssue, error) {
22 titleTemplate, err := template.New("buildpack").Parse(GithubIssueTitleTemplate)
23 if err != nil {
24 return GithubIssue{}, err
25 }
26
27 bodyTemplate, err := template.New("buildpack").Parse(GithubIssueBodyTemplate)
28 if err != nil {
29 return GithubIssue{}, err
30 }
31
32 var title bytes.Buffer
33 err = titleTemplate.Execute(&title, b)
34 if err != nil {
35 return GithubIssue{}, err
36 }
37
38 var body bytes.Buffer
39 err = bodyTemplate.Execute(&body, b)
40 if err != nil {
41 return GithubIssue{}, err
42 }
43
44 return GithubIssue{
45 title.String(),
46 body.String(),
47 }, nil
48}
49
50func CreateBrowserCmd(browserURL, os string) (*exec.Cmd, error) {
51 _, err := url.ParseRequestURI(browserURL)

Callers 2

RegisterBuildpackMethod · 0.92
YankBuildpackMethod · 0.92

Calls 2

ExecuteMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected