Add visual indication for required fields in interaction mode #417

Open
opened 2021-09-27 06:28:21 +00:00 by justusbunsi · 2 comments
Member

Right now tea pr review has a different error handling of required fields for action request changes and comment. The former gives you a hint that you missed a required field so you can add the content for your change request. The latter just aborts the actual review resulting in losing your made code comments.
EDIT: The different behavior is due to Gitea version < 1.15.

It would be good to have a * for required options during selection. Maybe this could be done globally.

Right now `tea pr review` has a different error handling of required fields for action _request changes_ and _comment_. The former gives you a hint that you missed a required field so you can add the content for your change request. The latter just aborts the actual review resulting in losing your made code comments. EDIT: The different behavior is due to Gitea version < 1.15. It would be good to have a `*` for required options during selection. Maybe this could be done globally.
Member

Add a * for required options during selection. Maybe this could be done globally.

I created an upstream issue, should be rather easy to implement. https://github.com/AlecAivazis/survey/issues/382

Do not abort a review comment action on missing content. Instead let the user fix their mistake.

The bad error handling is because the server rejects the request, this situation probably occurs because you use gitea < 1.15:
In 1.15 comment-body for comment reviews became optional, when there is at least one code comment (#399).
We could add a version check for client side validation.

> Add a * for required options during selection. Maybe this could be done globally. I created an upstream issue, should be rather easy to implement. https://github.com/AlecAivazis/survey/issues/382 > Do not abort a review comment action on missing content. Instead let the user fix their mistake. The bad error handling is because the server rejects the request, this situation probably occurs because you use gitea < 1.15: In 1.15 comment-body for comment reviews became optional, when there is at least one code comment (#399). We could add a version check for client side validation.
noerw added the
kind
enhancement
label 2021-09-27 09:07:23 +00:00
Author
Member

The bad error handling is because the server rejects the request, this situation probably occurs because you use gitea < 1.15

That's most likely the case. I missed the already merged PR for that. I'll update the issue description.

> The bad error handling is because the server rejects the request, this situation probably occurs because you use gitea < 1.15 That's most likely the case. I missed the already merged PR for that. I'll update the issue description.
noerw added the
kind/dependency
label 2021-09-27 13:04:40 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/tea#417
No description provided.