keep in sync with newGithubPlugin
(include string)
| 90 | |
| 91 | // keep in sync with newGithubPlugin |
| 92 | func newGithubPluginForTest(include string) (*githubPlugin, error) { |
| 93 | ref, err := flake.ParseRef(include) |
| 94 | if err != nil { |
| 95 | return nil, err |
| 96 | } |
| 97 | |
| 98 | plugin := &githubPlugin{ref: ref} |
| 99 | name := strings.ReplaceAll(ref.Dir, "/", "-") |
| 100 | plugin.name = githubNameRegexp.ReplaceAllString( |
| 101 | strings.Join(lo.Compact([]string{ref.Owner, ref.Repo, name}), "."), |
| 102 | " ", |
| 103 | ) |
| 104 | return plugin, nil |
| 105 | } |
| 106 | |
| 107 | func TestGithubPluginAuth(t *testing.T) { |
| 108 | githubPlugin := githubPlugin{ |
no test coverage detected