feat: allow resolving keys in task context#968
Open
bhearsum wants to merge 1 commit into
Open
Conversation
This extends task-context to allow for calling `resolve_keyed_by` is a generic way. Combined with `task-context's` existing support for pulling context from parameters it removes the need for transforms for many usages of `resolve_keyed_by` (I counted at least a dozen or so in Gecko alone, and there's probably many more.) Mostly for simplicitly I chose to re-use `substitution-fields` as a source for what `resolve_keyed_by` should be called on. I could be convinced to maintain a separate list for that (although it might introduce repetition in certain cases). I'm honestly not sure which is preferable.
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.
This extends task-context to allow for calling
resolve_keyed_byis a generic way. Combined withtask-context'sexisting support for pulling context from parameters it removes the need for transforms for many usages ofresolve_keyed_by(I counted at least a dozen or so in Gecko alone, and there's probably many more.)Mostly for simplicitly I chose to re-use
substitution-fieldsas a source for whatresolve_keyed_byshould be called on. I could be convinced to maintain a separate list for that (although it might introduce repetition in certain cases). I'm honestly not sure which is preferable.