Skip to content

Commit d966e12

Browse files
authored
Inject regex into .spec.inputs.*.regex value in gitlab-ci lang (#14800)
1 parent 948ac05 commit d966e12

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

runtime/queries/gitlab-ci/injections.scm

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,22 @@
4949
(single_quote_scalar)
5050
] @injection.content)))
5151
(#set! injection.language "bash"))
52+
53+
54+
; https://docs.gitlab.com/ci/yaml/#specinputsregex
55+
; ```
56+
; spec:
57+
; inputs:
58+
; <input>:
59+
; regex: <regex>
60+
; ---
61+
; ```
62+
(block_mapping_pair
63+
key: (flow_node) @_key (#eq? @_key "regex")
64+
value: (flow_node
65+
[
66+
(single_quote_scalar) @injection.content
67+
(double_quote_scalar) @injection.content
68+
(plain_scalar (string_scalar) @injection.content)
69+
])
70+
(#set! injection.language "regex"))

0 commit comments

Comments
 (0)