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

Add confirmation message when building with plugin id "com.mattermost.plugin-starter-template" #156

Closed
wants to merge 1 commit into from

Conversation

haardikdharma10
Copy link
Contributor

Summary

Fixes: #152

@mattermod
Copy link
Contributor

Hello @haardikdharma10,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

@@ -57,6 +57,7 @@ endif
.PHONY: server
server:
ifneq ($(HAS_SERVER),)
$(info Are you sure you want to build the plugin with an id of "com.mattermost.plugin-starter-template"? Consider editing plugin.json to configure your project.)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if using $(info message) is the right approach or should it be changed to $(warning message)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only my system using warning outputs the line number, which is not so helpful.

Maybe adding a newline after the output helps to separate it from the following log lines.

@hanzei hanzei added the 2: Dev Review Requires review by a core committer label Jul 2, 2021
@mattermod
Copy link
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

/cc @jasonblais @jfrerich @emilyacook

@hanzei
Copy link
Contributor

hanzei commented Jul 13, 2021

Sorry for the delay @haardikdharma10

@larkox larkox self-requested a review July 14, 2021 08:52
Copy link

@larkox larkox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question here.

@@ -57,6 +57,7 @@ endif
.PHONY: server
server:
ifneq ($(HAS_SERVER),)
$(info Are you sure you want to build the plugin with an id of "com.mattermost.plugin-starter-template"? Consider editing plugin.json to configure your project.)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will show the message always, right? I mean... even if I have edited my plugin.json and have the correct id, I will still receive this message. Shouldn't we do a check on the manifest id somehow? Or add something more like "edit the plugin.json and remove this line".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @larkox, thanks for your review:) Instead of having a check, we can do something simple like adding "Ignore if already edited" to the end of the message. How does that sound?
/cc @hanzei

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like it, because a warning that always appear is a warning you ignore. And the problem will still be there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What change would you like to suggest here?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like:

ifeq ($(PLUGIN_ID), com.mattermost.plugin-starter-template)
    echo "Are you sure you want to build the plugin with an id of "com.mattermost.plugin-starter-template"? Consider editing plugin.json to configure your project."
endif

I would even consider exiting and not allowing the plugin to be compiled, but that may be too drastic :P

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haardikdharma10 let us know if you have any questions for the above suggestion?

@mattermod
Copy link
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

/cc @jasonblais @jfrerich @emilyacook

@hanzei hanzei added the Awaiting Submitter Action Blocked on the author label Aug 19, 2021
@hanzei hanzei closed this Feb 15, 2023
@mattermost-build mattermost-build removed the Awaiting Submitter Action Blocked on the author label Feb 15, 2023
@hanzei hanzei removed the 2: Dev Review Requires review by a core committer label Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin should require confirmation when building with plugin id "com.mattermost.plugin-starter-template"
6 participants