8000 MNT fix body too long in update_tracking_issue.py by lesteve · Pull Request #23615 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

MNT fix body too long in update_tracking_issue.py #23615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions maint_tools/update_tracking_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ def create_or_update_issue(body=""):
link = f"[{args.ci_name}]({args.link_to_ci_run})"
issue = get_issue()

max_body_length = 60_000
original_body_length = len(body)
# Avoid "body is too long (maximum is 65536 characters)" error from github REST API
if original_body_length > max_body_length:
body = (
f"{body[:max_body_length]}\n...\n"
f"Body was too long ({original_body_length} characters) and was shortened"
)

if issue is None:
# Create new issue
header = f"**CI failed on {link}**"
Expand Down
0