Skip to content

Conversation

@tidoust
Copy link
Member

@tidoust tidoust commented May 28, 2021

This update truncates the diff when it cannot fit in a PR description. The full diff gets dumped to the console instead.

Fixes #244.

This update truncates the diff when it cannot fit in a PR description. The full
diff gets dumped to the console instead.

Fixes #244.
@tidoust tidoust requested a review from dontcallmedom May 28, 2021 20:33
Copy link
Member

@dontcallmedom dontcallmedom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - is there any motivation to the 60,000 max?

@tidoust
Copy link
Member Author

tidoust commented Jun 1, 2021

LGTM - is there any motivation to the 60,000 max?

It's rather a lack of motivation to count the rest of the description precisely. This leaves a bit of room for extending the description if needed, and avoids having to think about off-by-1 errors ;)

@tidoust tidoust merged commit e111e8c into master Jun 1, 2021
@tidoust tidoust deleted the workflows-truncate-diff branch June 1, 2021 06:32
@dontcallmedom
Copy link
Member

It's rather a lack of motivation to count the rest of the description precisely. This leaves a bit of room for extending the description if needed, and avoids having to think about off-by-1 errors ;)

I guess my question was imprecise, but I'm guessing there is an actual upper bound of 65,536 characters then (I couldn't find the documentation of that limit)

@tidoust
Copy link
Member Author

tidoust commented Jun 1, 2021

I don't know where that limit is documented either. It appears in the error message returned by the GitHub API in the logs:

Validation Failed:
{
  "resource": "Issue",
  "code": "custom",
  "field": "body",
  "message": "body is too long (maximum is 65536 characters)"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pre-release workflows: trim PR description to 65536 characters

3 participants