-
Notifications
You must be signed in to change notification settings - Fork 558
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: plugin system hooks updated #3038
feat: plugin system hooks updated #3038
Conversation
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.
Thanks so much for the great work ! Here is some feedback so far.
Also please make sure to run make lint
and make format
!
Looks like we also need a changelog entry (example). |
@joshLong145 could you enable Allow edits from maintainers. ? I would like to add a commit that reinforce the test This is a checkbox in your PR. |
I think i have enabled it. if there are specifics you want to see in the tests I can add it. |
Thanks but it's not completely clear in my head, I have to draft it by coding! |
@joshLong145 I pushed a change to reinforce For that I had to change the signature of the If you look at the cases, you may find weird scenarios when the same hook is attached multiple times to the same command. At the current stage, this works, but we can choose to disable. I will provide a second commit to update the |
Sounds good. I have some comments to address from @aljo242 i can update the hash as the final commit once those are completed |
I don't think it's needed to change the commit hash since your last commits didn't change the plugin interface. About your change, what you are asserting are the command's arguments, not the command's flags. Can you rename flags to args ? Passing command's flags to plugin |
changed the property to |
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.
Tested, works like a charm, thank you @joshLong145, well done!
Note that flags support is ready, but I would like to merge yours first and adapt mine afterward.
#3060
Yes agreed, the implementation for passing flags can be added to hooks as well. Excited to see what is built with this |
Yes I'll add flags support to hooks too. |
* migration to newb branch after updating develop * update to changelog * moving command prefix to const * update to commit hash for replace * fixes to comment structure * reinforce TestLinkPluginHooks * chore: use latest hash for scaffolded plugin * pr comments * fix to error formatting * addition of error field in test struct * addition of arg testing in cmd plugin tests * registering of hook struct on init of plugin * change of flag property to args * fix cl Co-authored-by: josh Long <bean@joshs-MacBook-Air.local> Co-authored-by: Thomas Bruyelle <thomas.bruyelle@tendermint.com> Co-authored-by: Alex Johnson <alex@shmeeload.xyz> Co-authored-by: Thomas Bruyelle <thomas.bruyelle@gmail.com>
implementation of proposal #2913
Addition of hooks on plugins
Allows for pre, post and clean up operations on pre existing ignite commands.
updated with develop based on pr #3011