-
Notifications
You must be signed in to change notification settings - Fork 13
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
Update the integration-factory to take advantage of/utilize the new methods for the integration-base. #345
base: update-integration-base-to-v2
Are you sure you want to change the base?
Conversation
…ethods for the integration-base. Add the entityReference used by the integration-factory and any new itnegrations added, which allows for name-based module reference. This allows for the developer importing the same api module multiple times but with different intended purpose. Example: slack-admin and slack-user. There may be other use cases as well. This likely should be paired with a few other integration-related updates.
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Quality Gate passedIssues Measures |
integrationRecord.entityReference && | ||
Object.keys(integrationRecord.entityReference) > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition to check if entityReference
has any keys is incorrect. It should be:
Object.keys(integrationRecord.entityReference).length > 0
This ensures that the length of the keys array is greater than zero, properly verifying the presence of keys in the entityReference
object. The current implementation will always evaluate to false
as it's comparing a number (the result of Object.keys()
) directly to zero, which is not the intended logic.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
Add entityReference to Integration Model and Update Integration Factory
Add the entityReference field to the Integration Model and update the Integration Factory to support name-based module references. This enhancement allows developers to import the same API module multiple times with different intended purposes, such as slack-admin and slack-user.
Key changes:
entityReference
field to the Integration Model schemagetInstanceFromIntegrationId
method in Integration Factory to handle entityReferencegetModuleTypesAndKeys
method to map module types to keysThis update provides more flexibility in integration configurations and should be paired with other integration-related updates for full functionality.