(raw string)
| 117 | } |
| 118 | |
| 119 | func processComment(raw string) (string, error) { |
| 120 | lines := strings.Split(raw, "\n") |
| 121 | |
| 122 | var buffer bytes.Buffer |
| 123 | for _, line := range lines { |
| 124 | if strings.HasPrefix(line, "#") { |
| 125 | continue |
| 126 | } |
| 127 | buffer.WriteString(line) |
| 128 | buffer.WriteString("\n") |
| 129 | } |
| 130 | |
| 131 | message := strings.TrimSpace(buffer.String()) |
| 132 | |
| 133 | if message == "" { |
| 134 | return "", ErrEmptyMessage |
| 135 | } |
| 136 | |
| 137 | return message, nil |
| 138 | } |
| 139 | |
| 140 | const bugTitleTemplate = `%s |
| 141 |
no test coverage detected