(markdown string)
| 162 | } |
| 163 | |
| 164 | func extractYamlFromMarkdownCodeBlock(markdown string) string { |
| 165 | re := regexp.MustCompile("```yaml.*?\n([\\s\\S]+?)\n```") |
| 166 | |
| 167 | matches := re.FindStringSubmatch(markdown) |
| 168 | if len(matches) < 2 { |
| 169 | return "" |
| 170 | } |
| 171 | |
| 172 | return matches[1] |
| 173 | } |
| 174 | |
| 175 | func defaultConfigForPlugin(plugin cqapi.ListPlugin) *strings.Builder { |
| 176 | tmpl := `kind: {{.Kind}} |
no outgoing calls
no test coverage detected