Mattermost-plugin-github: Update webapp code to use `id` from manifest.js

Created on 14 Apr 2020  路  4Comments  路  Source: mattermost/mattermost-plugin-github

Currently, the pluginId value is hardcoded in many places, using state['plugins-github'].

This ticket request is to replace all occurrences with plugins-${id}

Easy Good First Issue Help Wanted TecReactJS TypTask

All 4 comments

I would like to work on that

Wow! 2 minutes after posting :) Sure, it is yours, @bakurits.

@jfrerich wouldn't it be better to call this variable pluginId and not id?
for example here

const id = ownProps.user ? ownProps.user.id : '';
const user = state['plugins-github'].githubUsers[id] || {};

id is already declared

@bakurits, I agree that pluginId would be more appropriate. Please use that naming convention!

Was this page helpful?
0 / 5 - 0 ratings