Skip to content
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

x/build/cmd/gerritbot: auto-wrap description #24832

Open
myitcv opened this issue Apr 12, 2018 · 5 comments
Open

x/build/cmd/gerritbot: auto-wrap description #24832

myitcv opened this issue Apr 12, 2018 · 5 comments
Labels
Builders x/build issues (builders, bots, dashboards) help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@myitcv
Copy link
Member

myitcv commented Apr 12, 2018

Per https://go-review.googlesource.com/c/vgo/+/105335/9//COMMIT_MSG#9 it would be good/nice to have gerritbot auto-wrap the first comment to save people having to do this by hand (which in a webpage text box is painful)

cc @andybons

@gopherbot gopherbot added this to the Unreleased milestone Apr 12, 2018
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Apr 12, 2018
@andybons andybons added NeedsFix The path to resolution is known, but the work has not been done. help wanted labels Apr 12, 2018
@ianlancetaylor
Copy link
Contributor

I'm not entirely comfortable with breaking long lines in the CL description. Those lines might be source code or other text with meaningful line breaks. I don't care much what happens with text that people type into the edit box on the web page, but I don't see how to reliably do the right thing with description sent in via git mail.

@myitcv
Copy link
Member Author

myitcv commented Apr 13, 2018

@ianlancetaylor - might be I've misclassified this for "gerritbot"; I was only looking to automate the wrapping of the description take from the Github PR when populating the CL description.

i.e. for golang/vgo#3 we would auto-wrap the description that is in the first comment:

screen shot 2018-04-13 at 23 51 28

Or did I misunderstand your point?

@ianlancetaylor
Copy link
Contributor

Ah, no, I misunderstood. Sure, it's fine with me to wrap when moving from a GitHub pull request to Gerrit.

@thepudds
Copy link
Contributor

thepudds commented Jul 7, 2023

Hi @heschi (or anyone), I'm curious if this is an example of something that Tricium could easily flag (e.g., maybe there is a rule already)?

Also, my guess is that flagging the issue might be a sufficient solution even if the text is not automatically corrected. That would presumably be simpler to implement, and probably helps with false positives. (That is, it might be a bit annoying if your nice ASCII table is flagged for line length in an automatically added comment, but it would be much more annoying if your nice ASCII table was automatically mangled by word-wrapping).

@heschi
Copy link
Contributor

heschi commented Jul 7, 2023

There are surprisingly few prebuilt Tricium analyzers, so no, there isn't something off the shelf. It should be pretty easy to add one. Or it might be possible to add directly to our recipe without much ceremony:
https://cs.opensource.google/go/x/build/+/luci-config:recipes/recipes/tricium_simple.py

But we haven't gotten much experience working with Tricium so even though it seems like an easy thing to add we probably won't get to it for a while.

Various doc links:
https://chromium.googlesource.com/infra/infra/+/main/go/src/infra/tricium/docs/contribute.md
https://crsrc.org/i/recipes-py/recipe_modules/tricium/api.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants