OpenNetworkingFoundation / cla-manager

Automated CLA management and verification for ONF projects on Github and Gerrit
https://cla.opennetworking.org
3 stars 6 forks source link

Gerrit terminal output should be split in shorter lines #103

Open ccascone opened 4 years ago

ccascone commented 4 years ago

This is ugly

remote: Hi user, this is the ONF bot 🤖 I'm glad you want to contribute to our projects! However, before accepting your contribution, we need to ask you to sign a Contributor License Agreement (CLA). You can do it online, it will take only few minutes:
remote:
remote: ✒️ 👉 https://cla.opennetworking.org

Message lines should be split such that the total line lenght including remote : is no more than 80 characters. For example:

remote: Hi user, this is the ONF bot 🤖 I'm glad you want to contribute to our
remote: projects! However, before accepting your contribution, we need to ask
remote: you to sign a Contributor License Agreement (CLA). You can do it online,
remote: it will take only few minutes:
remote:
remote: ✒️ 👉 https://cla.opennetworking.org
ccascone commented 4 years ago

Submitted #105 to wrap output text in terminal message. @zdw can you please try it and deploy on Gerrit?

zdw commented 4 years ago

Looks good, one minor naming convention note.

zdw commented 4 years ago

Tested on ONOS gerrit, works! Thanks @ccascone!

ccascone commented 4 years ago

It doesn't seem to work as expected. What I get is:

remote: Hi user, this is the ONF bot 🤖 I'm glad you want to contribute to our
remote: projects! However, before accepting your contribution, we need to ask
remote: you to sign a Contributor License Agreement (CLA). You can do it online,
remote: it will take only few minutes:  ✒️ 👉 https://cla.opennetworking.org
remote: After signing, make sure to add your email carmelo@opennetworking.org to
remote: the agreement.

The URL with the pen emoji should be on an independent line

zdw commented 4 years ago

Seems like the rewrap algorithm is:

  1. Replace all newlines with whitespace
  2. Remove all duplicate whitespace
  3. Break before line length is exceeded

The current output isn't unusable, but you're right that it could be improved.