-
Notifications
You must be signed in to change notification settings - Fork 574
Add [metadata]
attribute for adding custom metadata to recipes
#2794
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
Conversation
This mostly looks fine to me! However, I have some questions about the design:
|
I wonder if you're asking about metadata being repeatable or a more generic question about attaching multiple metadata items per recipe. If it's the latter I envisioned multiple tools, each with their own metadata, which can at the same time use (As a practical example, I'm currently parsing pragma-like comments from recipes using JavaScript and there are multiple different ones in one recipe). I initially chose "repeatable" as I had key-value structure for metadata in mind (where each external tool would use their different key and they could coexist) but stopped half-way as I was wondering if this is a bit too complex.
I think it's a reasonable approach and I'm happy to adjust the code if we settle on this.
Totally agreed. The PR didn't take too much time and I think having something concrete is a great conversation starter. Thanks for your time! 👋 |
Let's allow a list of strings, as well as allowing the metadata attribute to appear multiple times. I don't see any issue with it, and it allows metadata authors flexibility in how they'd like to structure their metadata. |
5ebdf8d
to
a3352bf
Compare
This PR adds `metadata` attribute, which can appear multiple times on a recipe. The attribute takes a list of strings and its value can be inspected via JSON dump of the `justfile`. The primary motivation is custom tooling built around `just` that can be used to, for example, automate creation of CI pipelines and other pre-processing that is outside of `just`'s scope. Fixes: casey#2703
a3352bf
to
ba89d5c
Compare
Good idea. I've left the constraint to require at least one argument in the The code could be restructured a bit because structure-wise what |
metadata
attribute for adding custom metadata to recipes[metadata]
attribute for adding custom metadata to recipes
LGTM! |
This PR adds
metadata
attribute, which can appear multiple times on a recipe. The attribute takes a list of strings and its value can be inspected via JSON dump of thejustfile
.The primary motivation is custom tooling built around
just
that can be used to, for example, automate creation of CI pipelines and other pre-processing that is outside ofjust
's scope.Fixes: #2703