fix for multiple actions using the require-adobe-auth annotation in the same package#137
Merged
moritzraho merged 1 commit intoadobe:masterfrom Mar 17, 2020
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #137 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 57 57
Lines 1809 1809
Branches 325 326 +1
=========================================
Hits 1809 1809
Continue to review full report at Codecov.
|
moritzraho
commented
Mar 17, 2020
| // avoid side effects, do not modify input packages | ||
| const newPackages = { ...packages } | ||
| const newDeploymentPackages = { ...deploymentPackages } | ||
| const newPackages = cloneDeep(packages) |
Member
Author
There was a problem hiding this comment.
going with clone deep adds a (small) dependency but makes the implementation clearer and less error prone
moritzraho
commented
Mar 17, 2020
|
|
||
| // copy actions to the new package and move the action content to the new key | ||
| newPackages[key]['actions'] = { | ||
| ...packages[key]['actions'], |
Member
Author
There was a problem hiding this comment.
Here was the problem as we were overriding any previous action rewrites
shazron
approved these changes
Mar 17, 2020
bhageena
pushed a commit
to bhageena/aio-cli-plugin-runtime
that referenced
this pull request
Jul 21, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The current implementation of require-adobe-auth is not working when multiple actions in the same action use the annotation.
This is a fix for it using lodash.clonedeep.
Types of changes
Checklist: