-
Notifications
You must be signed in to change notification settings - Fork 148
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
Directory JSON actions secrets matches YAML #954
Directory JSON actions secrets matches YAML #954
Conversation
The failing E2E test seems to be failing on master as well. Marking as ready for review, any help is appreciated! |
@TimeTravelerFromNow I do have a suggestion for improvement: Once you make these changes, I’ll be happy to merge your PR! |
Can you please update the same for yaml, also:
I will check the failing E2E test and merge it soon. Thanks again. |
Thanks @kushalshit27 , |
Tests aren't passing because this is a fork but I've confirmed myself that they pass. Looks good, thanks for the contribution! |
According to the new commit rule, the commits should be signed to enhance security, authorship, trust and compliance. Updated the Contribution doc also. Please update the PR with signed commits, and we will be able to merge your PR! |
27a769e
to
d76d33b
Compare
Signed-off-by: Sebastian Detering <[email protected]>
Signed-off-by: Sebastian Detering <[email protected]>
Signed-off-by: Sebastian Detering <[email protected]>
Signed-off-by: Sebastian Detering <[email protected]> Rebased to master
d76d33b
to
3f4eed3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #954 +/- ##
==========================================
- Coverage 84.32% 84.28% -0.05%
==========================================
Files 116 116
Lines 3802 3805 +3
Branches 745 746 +1
==========================================
+ Hits 3206 3207 +1
- Misses 329 331 +2
Partials 267 267 ☔ View full report in Codecov by Sentry. |
813f807
🔧 Changes
Problem statement
On export, when using secrets placeholders in the actions JSON, this error occurs
TypeError: secrets.map is not a function
. Description in issue #955Solution
The line of code which handles parsing of secrets during export on YAML
src/context/yaml/handlers/actions.ts
by switching on the typetypeof action.secrets === 'string'
, was copied to thesrc/context/directory/handlers/actions.ts
. This code preserves the secret placeholder when it detects a type of string, such as"@@MY_SECRETS@@"
. If it is an array, it will callmapSecrets()
.mapSecrets()
I believe gets called when the keywords are set to their values defined in the config file during an import to Auth0.📚 References
🔬 Testing
--format directory
."secrets": []
array use a placeholder value instead."secrets": "@@MY_SECRETS@@"
exports/webapp/myconfig.json
📝 Checklist