Skip to content

feat: let vars take their value from an mq query over a file - #151

Merged
harehare merged 1 commit into
mainfrom
feat/vars-from-mq
Oct 20, 2026
Merged

harehare merged 1 commit into
mainfrom
feat/vars-from-mq

Conversation

@harehare

Copy link
Copy Markdown
Owner

vars = { VERSION = { mq = "nodes | filter(is_h2) | first() | to_text()", from = "CHANGELOG.md" } } runs the query the way the mq command does and uses the results, one per line. The input is Markdown, MDX, HTML or text by the file extension. ${NAME} in the query and the path refers to other vars, the result is shared within a run, a dry run shows the query, and a missing file or failing query names the variable.

@harehare
harehare added this pull request to stack #150 October 19, 2026 14:22
@harehare
harehare force-pushed the feat/vars-from-mq branch 2 times, most recently from 3b07de8 to 162b62f Compare October 20, 2026 00:07
Base automatically changed from feat/document-runtimes to main October 20, 2026 00:16
vars = { VERSION = { mq = "nodes | filter(is_h2) | first() | to_text()", from = "CHANGELOG.md" } } runs the query the way the mq command does and uses the results, one per line. The input is Markdown, MDX, HTML or text by the file extension. ${NAME} in the query and the path refers to other vars, the result is shared within a run, a dry run shows the query, and a missing file or failing query names the variable.
@harehare
harehare merged commit 87678d3 into main Oct 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant