Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Convert user_access_token_section to TypeScript #6432

Merged
merged 18 commits into from
Oct 29, 2020

Conversation

hiendinhngoc
Copy link
Contributor

Summary

Migrate 'components/user_settings/security/user_access_token_section' module and associated tests to TypeScript

Ticket Link

Fixes mattermost/mattermost#13693
JIRA: https://mattermost.atlassian.net/browse/MM-20548

@hiendinhngoc
Copy link
Contributor Author

I got an error at line 50 in index.ts file:
userAccessTokens: state.entities.users.myUserAccessTokens

error: Property 'myUserAccessTokens' does not exist on type 'UsersState'.
I already checked UsersState, it really doesn't have myUserAccessTokens property.

@jfrerich jfrerich added 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester labels Sep 14, 2020
@devinbinnie
Copy link
Member

I got an error at line 50 in index.ts file:
userAccessTokens: state.entities.users.myUserAccessTokens

error: Property 'myUserAccessTokens' does not exist on type 'UsersState'.
I already checked UsersState, it really doesn't have myUserAccessTokens property.

Thanks for the catch! I'll make a change to redux and get that fixed.

@devinbinnie
Copy link
Member

@hiendinhngoc The fix is in, you'll just need to update the mattermost-redux package to this commit and everything should work nicely: 1838b6c20c51d9f2a8c9899c91417672dced87f0

@hiendinhngoc
Copy link
Contributor Author

@hiendinhngoc The fix is in, you'll just need to update the mattermost-redux package to this commit and everything should work nicely: 1838b6c20c51d9f2a8c9899c91417672dced87f0

@devinbinnie thank you, I updated in my side by entering the version to package.json file, then npm install. After that, the error came out and type-check was passed from my local. However, CI shows the error with type-check. Is there any step that I missed or sth wrong here?

@devinbinnie
Copy link
Member

@hiendinhngoc The fix is in, you'll just need to update the mattermost-redux package to this commit and everything should work nicely: 1838b6c20c51d9f2a8c9899c91417672dced87f0

@devinbinnie thank you, I updated in my side by entering the version to package.json file, then npm install. After that, the error came out and type-check was passed from my local. However, CI shows the error with type-check. Is there any step that I missed or sth wrong here?

@hiendinhngoc CircleCI uses the copy of package-lock.json in the repo in order to fetch its packages, so you'll need to change that as well. Sorry for the inconvience.

@hiendinhngoc hiendinhngoc changed the title [WIP] Convert user_access_token_section to TypeScript Convert user_access_token_section to TypeScript Sep 18, 2020
@hiendinhngoc
Copy link
Contributor Author

@devinbinnie It seems an update for mattermost-redux at previous commit which caused type check error when I changed to 1838b6c20c51d9f2a8c9899c91417672dced87f0

@devinbinnie
Copy link
Member

@devinbinnie It seems an update for mattermost-redux at previous commit which caused type check error when I changed to 1838b6c20c51d9f2a8c9899c91417672dced87f0

@hiendinhngoc I guess you'll have to update the files to the latest commit then, see here: mattermost/mattermost-redux@6fdb466

@hanzei hanzei added the Awaiting Submitter Action Blocked on the author label Sep 22, 2020
@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

@jasonblais
Copy link
Contributor

Hi @hiendinhngoc, did you have questions on how to update the files to the latest commit: mattermost/mattermost-redux@6fdb466

If any, let us know! Happy to help :)

Copy link
Member

@devinbinnie devinbinnie left a comment

Choose a reason for hiding this comment

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

Looks good overall @hiendinhngoc, thanks for the contribution!
Just had a couple comments.

package-lock.json Outdated Show resolved Hide resolved
@devinbinnie
Copy link
Member

/update-branch

@devinbinnie devinbinnie self-requested a review October 27, 2020 16:11
Copy link
Member

@devinbinnie devinbinnie left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @hiendinhngoc!

Copy link
Member

@hmhealey hmhealey left a comment

Choose a reason for hiding this comment

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

Thanks for the work on this, @hiendinhngoc. I have a couple suggestions for things to change, but they're just tightening up the type definitions slightly.

Copy link
Member

@hmhealey hmhealey left a comment

Choose a reason for hiding this comment

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

Thanks! This is good for QA review then

@hmhealey hmhealey removed the 2: Dev Review Requires review by a core commiter label Oct 28, 2020
@hmhealey hmhealey added the Setup Cloud Test Server Setup a test server using Mattermost Cloud label Oct 28, 2020
Copy link
Contributor

@jgilliam17 jgilliam17 left a comment

Choose a reason for hiding this comment

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

Thank you @hiendinhngoc
Tested, looks good to merge.

  • Verified Personal Access Tokens section in Account Settings>Security. Able to create, deactivate, delete - as expected.
    @devinbinnie Can you please help merge? Thanks. 🙂

@jgilliam17 jgilliam17 added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester Setup Cloud Test Server Setup a test server using Mattermost Cloud labels Oct 29, 2020
@mm-cloud-bot
Copy link

Test server destroyed

@devinbinnie devinbinnie merged commit 83856dc into mattermost:master Oct 29, 2020
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Oct 29, 2020
@ogi-m ogi-m added the Tests/Not Needed Does not require new release tests label Nov 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Tests/Not Needed Does not require new release tests
Projects
None yet