Skip to content

Split GitHub comments into multiple comments if plan output is long  #1645

Open
@raouf-xh

Description

@raouf-xh

GitHub has a max of 65,535 characters per comment. So in case of a long plan output, it is not sent to GitHub comment and throws an error within the Job

failed to report strategy: 
error while sending job comments error editing comment: PATCH https://api.github.com/repos/raouf-xh/terraform-test/issues/comments/xxxxx: 422 Validation Failed [{Resource:IssueComment Field:body Code:custom Message:body is too long (maximum is 65536 characters)}]
failed to report strategy: 
Warning: nil passed to plan result, sending empty
Failed to run commands. error while sending job comments error editing comment: PATCH https://api.github.com/repos/raouf-xh/terraform-test/issues/comments/xxxxx: 422 Validation Failed [{Resource:IssueComment Field:body Code:custom Message:body is too long (maximum is 65536 characters)}]
Error: Process completed with exit code 5.

Fix would be splitting the comment into multiple comments if it's over that size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions