Browse Source

Kill dangling brackets

pull/22/head
Kegan Dougal 8 years ago
parent
commit
5e37053e63
  1. 6
      src/github.com/matrix-org/go-neb/realms/jira/jira.go
  2. 12
      src/github.com/matrix-org/go-neb/services/jira/jira.go

6
src/github.com/matrix-org/go-neb/realms/jira/jira.go

@ -224,8 +224,10 @@ func (r *JIRARealm) ProjectKeyExists(userID, projectKey string) (bool, error) {
return false, errors.New("No response returned")
}
if res.StatusCode < 200 || res.StatusCode >= 300 {
return false, fmt.Errorf("%srest/api/2/project returned code %d",
r.JIRAEndpoint, res.StatusCode)
return false, fmt.Errorf(
"%srest/api/2/project returned code %d",
r.JIRAEndpoint, res.StatusCode,
)
}
for _, p := range projects {

12
src/github.com/matrix-org/go-neb/services/jira/jira.go

@ -266,13 +266,17 @@ func htmlSummaryForIssue(issue *jira.Issue) string {
// "Flibble Wibble [P1, In Progress]"
status := html.EscapeString(issue.Fields.Status.Name)
if issue.Fields.Resolution != nil {
status = fmt.Sprintf("%s (%s)",
status, html.EscapeString(issue.Fields.Resolution.Name))
status = fmt.Sprintf(
"%s (%s)",
status, html.EscapeString(issue.Fields.Resolution.Name),
)
}
return fmt.Sprintf("%s [%s, %s]",
return fmt.Sprintf(
"%s [%s, %s]",
html.EscapeString(issue.Fields.Summary),
html.EscapeString(issue.Fields.Priority.Name),
status)
status,
)
}
func init() {

Loading…
Cancel
Save