chiefonboarding / ChiefOnboarding

Free and open-source employee onboarding platform. Onboard new hires through Slack or the web portal.
https://chiefonboarding.com
GNU Affero General Public License v3.0
656 stars 121 forks source link

Allow usage of response of previous request in the same integration #357

Closed GDay closed 11 months ago

coveralls commented 11 months ago

Coverage Status

coverage: 93.488% (-0.02%) from 93.506% when pulling 1938f5fc8f3c782178c00a56103a1ece56656c22 on usage-of-previous-result-in-integration into 7decda70ef7b8fdd292e6831a2b97fdec0926a06 on master.

GDay commented 11 months ago

@cscheng Besides the use here, I think this would also come in handy for getting data from some APIs (probably relatively rare, though).

For example, if the first execute object store_data

Note that store_data from the other PR saves the data from the new hire indefinitely in the system. Which is likely unnecessary for a bunch of manifests and could leave us with more sensitive data stored in the database than we might want.

I don't want the manifest to become larger than necessary: using additional variables for only locally referenced variables adds a few extra items to the manifest, while we could simply use indexes to get the correct data for an unlimited amount of execute items.

Unless you see a lot of downsides to this approach, then I prefer to go with the approach of this PR.

cscheng commented 11 months ago

Good point. I didn't think of that you would want to use a response value without saving it, but it might make sense in some cases to not store (private) data that might only be used once (for an e-mail). May be this is worth mentioning in the documentation near the store_data section?