(application *TestApplicationSet, issue *github.Issue)
| 151 | } |
| 152 | |
| 153 | func setIssueProperties(application *TestApplicationSet, issue *github.Issue) error { |
| 154 | issue.Title = &application.issueTitle |
| 155 | |
| 156 | if application.body != "" { |
| 157 | issueBodyPath := fmt.Sprintf("./script/mock-issue-bodies/%s.md", application.body) |
| 158 | issueBody, err := os.ReadFile(issueBodyPath) |
| 159 | if err != nil { |
| 160 | return fmt.Errorf("unable to read the file: %v", err) |
| 161 | } |
| 162 | bodyString := string(issueBody) |
| 163 | issue.Body = &bodyString |
| 164 | } |
| 165 | |
| 166 | if application.isClosed { |
| 167 | state := "closed" |
| 168 | issue.State = &state |
| 169 | } |
| 170 | |
| 171 | if application.statusLabel != "" { |
| 172 | label := fmt.Sprintf("status: %s", application.statusLabel) |
| 173 | issue.Labels = append(issue.Labels, &github.Label{Name: &label}) |
| 174 | } |
| 175 | |
| 176 | return nil |
| 177 | } |
| 178 | |
| 179 | func setTestApplication(testName string) { |
| 180 | application, err := findTestApplication(testName) |
no outgoing calls
no test coverage detected