Skip to content

Commit

Permalink
fix(vcs/bitbucket): pull request comment must be less than 32768 chars (
Browse files Browse the repository at this point in the history
#5601)

Signed-off-by: francois  samin <[email protected]>
  • Loading branch information
fsamin authored Dec 22, 2020
1 parent be8971f commit 76f67d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions engine/vcs/bitbucketserver/client_pull_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ func (b *bitbucketClient) PullRequestComment(ctx context.Context, repo string, p
if err != nil {
return sdk.WithStack(err)
}

if len(prRequest.Message) >= 32768 {
prRequest.Message = prRequest.Message[0:32750] + "\n[truncated]"
}

payload := map[string]string{
"text": prRequest.Message,
}
Expand Down

0 comments on commit 76f67d1

Please sign in to comment.