Skip to content
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

Add Buildkite command/commands support to yaml injections #10090

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions runtime/queries/yaml/injections.scm
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,24 @@

; Modified for Helix from https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/yaml/injections.scm

;; Github actions ("run") / Gitlab CI ("scripts")
;; Github actions: run
;; Gitlab CI: scripts, before_script, after_script
;; Buildkite: command, commands
(block_mapping_pair
key: (flow_node) @_run (#match? @_run "^(run|script|before_script|after_script)$")
key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands")
value: (flow_node
(plain_scalar
(string_scalar) @injection.content)
(#set! injection.language "bash")))

(block_mapping_pair
key: (flow_node) @_run (#match? @_run "^(run|script|before_script|after_script)$")
key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands")
value: (block_node
(block_scalar) @injection.content
(#set! injection.language "bash")))

(block_mapping_pair
key: (flow_node) @_run (#match? @_run "^(run|script|before_script|after_script)$")
key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands")
value: (block_node
(block_sequence
(block_sequence_item
Expand All @@ -45,7 +47,7 @@
(#set! injection.language "bash")))))

(block_mapping_pair
key: (flow_node) @_run (#match? @_run "^(run|script|before_script|after_script)$")
key: (flow_node) @_run (#any-of? @_run "run" "script" "before_script" "after_script" "command" "commands")
value: (block_node
(block_sequence
(block_sequence_item
Expand Down
Loading