Skip to content

Commit

Permalink
Merge pull request #16 from k-kinzal/fixes-long-description-in-check
Browse files Browse the repository at this point in the history
fixes long description in check command
  • Loading branch information
k-kinzal authored Nov 18, 2019
2 parents cd1c154 + 643d9a6 commit c6212ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/api/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"bytes"
"context"
"fmt"
"text/template"

"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -38,6 +39,9 @@ func (c *Client) Status(ctx context.Context, pulls []*PullRequest, opt *StatusOp
}
description := buf.String()
buf.Reset()
if len(description) > 140 {
description = fmt.Sprintf("%s...", description[:137])
}

if err := contextTemplate.Execute(buf, pull); err != nil {
return err
Expand Down

0 comments on commit c6212ff

Please sign in to comment.