-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: command error as comment #502
Conversation
… generated by a command
This pull request is on hold due to low priority. |
Reviewpad Report
ℹ️ Messages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review. Please have a look at the comment 🙏
lang/aladino/env.go
Outdated
@@ -51,6 +52,7 @@ type BaseEnv struct { | |||
RegisterMap RegisterMap | |||
Report *Report | |||
Target codehost.Target | |||
EventData *handler.EventData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need EventData
? EventPayload
should be enough for what we need here. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, makes perfect sense, thank you
@@ -9,7 +9,8 @@ type Statement struct { | |||
} | |||
|
|||
type Program struct { | |||
statements []*Statement | |||
IsFromCommand bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IsFromCommand
should be another property of the env
in which the program is running. I would suggest moving this into the BaseEnv
. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one I think better to keep it in the program since we are checking if it's a command after the BaseEnv
is built I think, what do you think @ferreiratiago
📈 Pull Request Metrics💻 Coding Time: 1 day |
Description
Currently, a command might be syntactically correct but during execution of the generated program for a command an error might happen which makes it seem like it's a reviewpad error when in a reality it was the command that failed because of wrong input so this PR provides feedback to the user in the form of a GitHub comment.
Related issue
Closes #471
Type of change
Improvements (non-breaking change without functionality)
How was this tested?
Unit tests and Manual tests
Checklist
task check -f
and have no issuesCode review and merge strategy (ship/show/ask)