mintsweet commented on code in PR #4097:
URL:
https://github.com/apache/incubator-devlake/pull/4097#discussion_r1061211809
##########
config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts:
##########
@@ -104,25 +104,25 @@ export const useBPUpgrade = ({ id, onResetError }:
UseBPUpgradeProps) => {
const scopeDetail = await getScopeDetail(plugin, connectionId,
scope.options);
// put data scope
- const res = await API.updateDataScope(plugin, connectionId,
getScopeId(plugin, scopeDetail), {
+ await API.updateDataScope(plugin, connectionId, getScopeId(plugin,
scopeDetail), {
...scopeDetail,
- transformationRuleId: transfromationRule?.id,
+ transformationRuleId: transformationRule?.id,
});
return {
- id: res.id,
+ id: getScopeId(plugin, scopeDetail).toString(),
entities: scope.entities,
};
};
const upgradeConnection = async (connection: any) => {
const { plugin, connectionId } = connection;
- const scope = await Promise.all(connection.scope.map((sc: any) =>
upgradeScope(plugin, connectionId, sc)));
Review Comment:
Do not modify this name, because scopes means glasses.
##########
config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts:
##########
@@ -104,25 +104,25 @@ export const useBPUpgrade = ({ id, onResetError }:
UseBPUpgradeProps) => {
const scopeDetail = await getScopeDetail(plugin, connectionId,
scope.options);
// put data scope
- const res = await API.updateDataScope(plugin, connectionId,
getScopeId(plugin, scopeDetail), {
+ await API.updateDataScope(plugin, connectionId, getScopeId(plugin,
scopeDetail), {
...scopeDetail,
- transformationRuleId: transfromationRule?.id,
+ transformationRuleId: transformationRule?.id,
});
return {
- id: res.id,
+ id: getScopeId(plugin, scopeDetail).toString(),
Review Comment:
`${getScopeId(plugin, scopeDetail)}` will better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]