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

[GH-54] sync with latest mattermost-plugin-starter-template #68

Merged
merged 29 commits into from
Sep 3, 2020

Conversation

jfrerich
Copy link
Contributor

@jfrerich jfrerich commented Jul 27, 2020

Summary

Syncs with latest mattermost-plugin-starter-template

Ticket Link

Fixes:
#54
#69

@jfrerich jfrerich changed the title initial add [GH-54] sync with latest mattermost-plugin-starter-template Jul 27, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2020

Codecov Report

Merging #68 into master will increase coverage by 0.59%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
+ Coverage   29.48%   30.08%   +0.59%     
==========================================
  Files           8        9       +1     
  Lines         234      236       +2     
==========================================
+ Hits           69       71       +2     
  Misses        153      153              
  Partials       12       12              
Impacted Files Coverage Δ
server/service/delete_subscription.go 35.29% <ø> (ø)
server/service/get_subscription.go 75.00% <ø> (ø)
server/service/save_subscription.go 31.57% <ø> (ø)
server/util/util.go 40.67% <ø> (ø)
server/manifest.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eed9fc7...93d55b1. Read the comment docs.

@jfrerich jfrerich force-pushed the GH-54-make-apply branch 3 times, most recently from 5e7c446 to 832471c Compare July 27, 2020 23:48
golangci-lint fixes
make check-style fixes
broken test fixes
@hanzei hanzei linked an issue Jul 28, 2020 that may be closed by this pull request
@jfrerich jfrerich marked this pull request as ready for review July 28, 2020 15:46
@jfrerich jfrerich requested review from hanzei and mickmister and removed request for hanzei July 28, 2020 15:47
@jfrerich jfrerich self-assigned this Jul 28, 2020
@jfrerich jfrerich added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels Jul 28, 2020
@jfrerich
Copy link
Contributor Author

I quite like having colorized terminal output and although I am pulling this OUT of the Makefile, what do you guys think about adding this color highlighting to our Makefile :)

https://github.com/mattermost/mattermost-plugin-confluence/pull/68/files#diff-b67911656ef5d18c4ae36cb6741b7965L27-L34

@jfrerich jfrerich linked an issue Jul 28, 2020 that may be closed by this pull request
@mickmister
Copy link
Contributor

mickmister commented Jul 29, 2020

@jfrerich Do you mind going in detail with your process how you performed this sync?

@jfrerich
Copy link
Contributor Author

@mickmister, I followed the steps found inside #69.

It would be great to have this PR for doing this. I will have to get back to that ticket and see if I can repro much of the changes needed for the syncing in this PR.

@mickmister
Copy link
Contributor

@jfrerich Any reason we can't use the plugin repo sync tool? Here's my test drive of using it mattermost-community/mattermost-plugin-todo#103 , including the plan.yml I used to sync. You can adjust the original plan.yml as you see fit.

@jfrerich
Copy link
Contributor Author

Nice. I hadn't seen the sync tool in use! I'll have to test it out also and see how it reacts against my changes.

@jfrerich
Copy link
Contributor Author

So, I did find some changes that I missed. I also have quite a few differences with .editorconfig and webapp/.eslintrc.json.

  • .circleci/config.yml` was drastically reduced.
  • .editorconfig updated
  • webapp/.eslintrc.json updated

@jfrerich jfrerich requested a review from hanzei August 3, 2020 17:46
@jfrerich
Copy link
Contributor Author

jfrerich commented Aug 3, 2020

ok! There were quite a few commits needed after addressing those latest comments (syncing webpack, package.json, socket API), but this is ready for re-review

Copy link
Collaborator

@hanzei hanzei left a comment

Choose a reason for hiding this comment

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

LGMT 👍

build/sync/plan.yml Outdated Show resolved Hide resolved
@hanzei hanzei added the Awaiting Submitter Action Blocked on the author label Aug 7, 2020
Copy link
Contributor

@mickmister mickmister left a comment

Choose a reason for hiding this comment

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

Nothing blocking but I'm curious about some of the string changes.

@@ -8,7 +8,7 @@ import (
"github.com/mattermost/mattermost-plugin-confluence/server/serializer"
)

const generalError = "Some error occurred. Please try again after sometime."
const generalError = "some error occurred. Please try again after sometime"
Copy link
Contributor

@mickmister mickmister Aug 7, 2020

Choose a reason for hiding this comment

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

Just out of curiosity, why was this changed to lowercase? Same with other similar string changes.

Also a grammar suggestion:

Suggested change
const generalError = "some error occurred. Please try again after sometime"
const generalError = "some error occurred. Please try again after some time"

Copy link
Contributor

Choose a reason for hiding this comment

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

What about the grammar suggestions regarding capitalization? Is there a reason why this was made lowercase?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was a linting error, so I changed it

Copy link
Contributor

Choose a reason for hiding this comment

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

What was the linting error? It seems incorrect to me to display an error message that begins with a lowercase letter, when it is meant to be a sentence. Definitely something we want to fix in our lint settings rather than doing it this way 2/5

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand their reasoning for the check. I also checked several other plugins. These plugins already adhere to the lint check

image

Copy link
Contributor

Choose a reason for hiding this comment

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

I sort of disagree with it, if you're trying to have full sentences in an error message. But I think they are advising to not have full sentences in the error description portion of a log for example.

Comment on lines 12 to 15
this.baseUrl = url.protocol + '//' + url.host;
this.pluginUrl = this.baseUrl + '/plugins/' + Constants.PLUGIN_NAME;
this.apiUrl = this.baseUrl + '/api/v4';
this.pluginApiUrl = this.pluginUrl + '/api/v1';
Copy link
Contributor

Choose a reason for hiding this comment

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

Why were these changed to using the + syntax?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Leaving these with the ${url.protocol} causes eslint to fail. I don't like the change, but made it to move forward with the PR

webapp/webpack.config.js Show resolved Hide resolved
RECEIVED_SUBSCRIPTION: `${PLUGIN_NAME}_received_subscription`,
OPEN_SUBSCRIPTION_MODAL: PLUGIN_NAME + '_open_subscription_modal',
CLOSE_SUBSCRIPTION_MODAL: PLUGIN_NAME + '_close_subscription_modal',
RECEIVED_SUBSCRIPTION: PLUGIN_NAME + '_received_subscription',
Copy link
Contributor

Choose a reason for hiding this comment

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

Is something in the eslint config suggesting this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately yes this caused eslint to fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

What rules caused it to fail? The config should be updated to support the better syntax

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently this is a bug eslint/eslint#13248

webapp/src/constants/action_types.js Outdated Show resolved Hide resolved
use id, from webapp/src/manifest.js, instead of hardcoded PLUGIN_NAME
from webapp/src/constants/manifest
@jfrerich jfrerich requested a review from mickmister August 12, 2020 03:46
@jfrerich
Copy link
Contributor Author

@mickmister I went ahead and addressed some of your comments in another commit. Can you please re-review?

@jfrerich jfrerich removed the Awaiting Submitter Action Blocked on the author label Aug 12, 2020
@jfrerich jfrerich self-assigned this Aug 18, 2020
@jfrerich jfrerich removed the 2: Dev Review Requires review by a core committer label Aug 24, 2020
@jfrerich jfrerich requested a review from DHaussermann August 24, 2020 18:05
Copy link

@DHaussermann DHaussermann left a comment

Choose a reason for hiding this comment

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

Tested and Passed

  • Build and deployed
  • Briefly regression tested
  • No issues found no further functional testing needed for this PR
    LGTM!

Release testing will take place on next version bump.

@DHaussermann DHaussermann added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels Aug 31, 2020
@jfrerich jfrerich merged commit 3cbffad into master Sep 3, 2020
@jfrerich jfrerich deleted the GH-54-make-apply branch September 3, 2020 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate GolangCI-Lint make apply produces invalid files
5 participants