e2corporation commented on code in PR #3496:
URL:
https://github.com/apache/incubator-devlake/pull/3496#discussion_r1003246898
##########
config-ui/src/hooks/data-scope/useTransformationsManager.jsx:
##########
@@ -94,33 +94,38 @@ const getDefaultTransformations = (provider) => {
const useTransformationsManager = () => {
const [transformations, setTransformations] = useState({})
- const generateKey = (
- connectionProvider,
- connectionId,
- projectNameOrBoard
- ) => {
+ /**
+ * @param {string} connectionProvider
+ * @param {string} connectionId
+ * @param {Entity} entity
+ * @return {string}
+ */
+ const generateKey = (connectionProvider, connectionId, entity) => {
let key = `not-distinguished`
switch (connectionProvider) {
case Providers.GITHUB:
case Providers.GITLAB:
case Providers.JENKINS:
- key = projectNameOrBoard?.id
+ key = entity?.id
Review Comment:
We should be using the accessory function instead,
`entity.getConfiguredEntityId()`
```suggestion
key = entity?.getConfiguredEntityId()
```
--
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]