Thanks to visit codestin.com
Credit goes to github.com

Skip to content

(🎁) ci: include more of the primer comment #15032

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KotlinIsland
Copy link
Contributor

@KotlinIsland KotlinIsland commented Apr 11, 2023

I don't think you need to truncate the primer comment anymore.

proof: here we have applied the same change, removing the truncation of the comment, which is having no issue commenting the full-form of the diff.

@github-actions

This comment has been minimized.

Copy link
Contributor

@ikonst ikonst left a comment

Choose a reason for hiding this comment

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

All -s, nice!

@ikonst
Copy link
Contributor

ikonst commented Apr 11, 2023

@ikonst
Copy link
Contributor

ikonst commented Apr 12, 2023

Actually, are you sure that KotlinIsland/basedmypy#357 (comment) is pushing the limit?

In particular, in #14059 there are two issues being discussed:

  • comments that are long enough to be rejected by GitHub API
  • a single project "monopolizing" the report

@ikonst
Copy link
Contributor

ikonst commented Apr 12, 2023

Trial and error shows that this is the longest comment GitHub would accept:

python3 -c 'print("x" * (2**18 - 2))'  | pbcopy

Meanwhile, the UI says the maximum length is 65,535 characters, which is probably isn't far from the truth when taking Unicode into consideration.

@KotlinIsland KotlinIsland marked this pull request as draft April 12, 2023 09:16
@KotlinIsland KotlinIsland changed the title (🎁) ci: don't truncate primer comment (🎁) ci: include more of the primer comment Apr 12, 2023
@KotlinIsland
Copy link
Contributor Author

Actually, are you sure that KotlinIsland/basedmypy#357 (comment) is pushing the limit?

Ergh, I knew it was too good to be true :(. So basically the problem with the current solution is that I don't see all the diff, I can see three solutions:

  1. Include more of the diff to fill out the comment limit, not a full form solution, as a big diff could over fill it.
  2. comment multiple times
  3. when the comment is truncated, include a link to the action output which will contain the full form diff.

I've updated this PR to meet option 1, happy to accept other ideas.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

@ikonst
Copy link
Contributor

ikonst commented Apr 12, 2023

A "core dump" in a comment is not what comments were made for, so GitHub's UI is not particularly accommodating for that use case, and it can also interfere with our normal communications around PRs in comments.

Maybe opt for shorter output that only gives a "taste" for what changed, and a link to the artifact download URL, e.g. matchArtifact.archive_download_url?

@KotlinIsland
Copy link
Contributor Author

KotlinIsland commented Apr 12, 2023

I think that linking to a downloadable zip is not an idea UX (although would be an improvement).

What if we always put the changes in a details? I'll put something together...

@ikonst
Copy link
Contributor

ikonst commented Apr 12, 2023

Also check that "Details" don't slow down scrolling etc. (And then maybe Details per project?)

@hauntsaninja
Copy link
Collaborator

I like the idea of including a link to artifact download if we truncated things.

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.

3 participants