Use a custom extension for File type#1420
Merged
carolynvs merged 2 commits intogetporter:mainfrom Jan 19, 2021
Merged
Conversation
11e66ad to
cfd3700
Compare
Previously we had checks throughout the codebase checking if a parameter is Porter's special "file" type. Which lead to this bug. I have made the file type a custom extension under the porter namespace, and centralized the logic for the parameter type. I will submit this to the CNAB spec as a well-known extension since I think it is useful beyond Porter. I also made our extension constants consistent. Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Member
Author
|
@vdice This is now ready for review. |
vdice
reviewed
Jan 15, 2021
Member
vdice
left a comment
There was a problem hiding this comment.
So many improvements in this PR! Only a few comments/questions.
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Member
Author
|
I have created an issue to track the inconsistent spec around the dependencies key. Porter writes it has the fully |
Member
Author
|
Here's the PR to clarify the spec: cnabio/cnab-spec#404 |
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.
What does this change
Previously we had checks throughout the codebase checking if a parameter is Porter's special "file" type. Which lead to #1417 where
porter explainshows the underlying string type for a file parameter instead of "file".I have made the file type a custom extension under the porter namespace, and centralized the logic for the parameter type. I will submit this to the CNAB spec as a well-known extension since I think it is useful beyond Porter.
I also made our extension constants consistent.
What issue does it fix
Fixes #1417
Notes for the reviewer
Sorry this isn't split up into two commits! 😝
Checklist
If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇♀️