| 152 | } |
| 153 | |
| 154 | func (a *Application) SetApprover() error { |
| 155 | approverIdValue, err := getEnv("APPROVER_ID") |
| 156 | if err != nil { |
| 157 | return err |
| 158 | } |
| 159 | |
| 160 | approverId, err := strconv.Atoi(approverIdValue) |
| 161 | if err != nil { |
| 162 | return err |
| 163 | } |
| 164 | |
| 165 | approverUsername, err := getEnv("APPROVER_USERNAME") |
| 166 | if err != nil { |
| 167 | return err |
| 168 | } |
| 169 | |
| 170 | a.ApproverId = approverId |
| 171 | a.ApproverUsername = approverUsername |
| 172 | |
| 173 | return nil |
| 174 | } |
| 175 | |
| 176 | // Take the Markdown-format body of an issue and break it down by section header |
| 177 | // and the content directly below it. We can reasonably expect the correct format |