Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 57bc4d6

Browse files
committed
improve regexes by allowing optional spaces
1 parent a507560 commit 57bc4d6

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

config.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ steps:
4848
action_id: fileContents
4949
filename: 'config.yml'
5050
- type: gate
51-
left: '/^title:([^#]\w)+.*$/gm'
51+
left: '/^title: *\w(?![ \t]*#).*$/gm'
5252
operator: test
5353
right: '%actions.fileContents%'
5454
else:
@@ -78,7 +78,7 @@ steps:
7878
action_id: fileContents
7979
filename: 'config.yml'
8080
- type: gate
81-
left: '/^\s{2}repo:([^#]\w)+.*$/gm'
81+
left: '/^ repo: *lab-starter-template(?!#).*$/gm'
8282
operator: test
8383
right: '%actions.fileContents%'
8484
else:
@@ -108,7 +108,7 @@ steps:
108108
action_id: fileContents
109109
filename: 'config.yml'
110110
- type: gate
111-
left: '/^\s{2}name:([^#]\w)+.*$/gm'
111+
left: '/^ name: *\w(?![ \t]*#).*$/gm'
112112
operator: test
113113
right: '%actions.fileContents%'
114114
else:
@@ -162,7 +162,7 @@ steps:
162162
action_id: fileContents
163163
filename: 'config.yml'
164164
- type: gate
165-
left: '/^- type:\s*createIssue.*\n title:\s*\w.+\n body:\s*welcome-text\.md$/gm'
165+
left: '/^- type: *createIssue(?!#).*$\n title: *(?![ \t]*#).*$\n. body: *welcome-text.md(?!#).*$/gm'
166166
operator: test
167167
right: '%actions.fileContents%'
168168
else:
@@ -253,7 +253,7 @@ steps:
253253
action_id: fileContents
254254
filename: 'config.yml'
255255
- type: gate
256-
left: '/^ event: pull_request.opened(?!#).*$/gm'
256+
left: '/^ event: *pull_request.opened(?!#).*$/gm'
257257
operator: test
258258
right: '%actions.fileContents%'
259259
else:
@@ -283,7 +283,7 @@ steps:
283283
action_id: fileContents
284284
filename: 'config.yml'
285285
- type: gate
286-
left: '/^ - type: gate(?!#).*$/gm'
286+
left: '/^ - type: *gate(?!#).*$/gm'
287287
operator: test
288288
right: '%actions.fileContents%'
289289
else:
@@ -337,7 +337,7 @@ steps:
337337
# action_id: fileContents
338338
# filename: 'config.yml'
339339
# - type: gate
340-
# left: '/^ left: '%payload.pull_request.title%'(?!#).*$\n operator: ===(?!#).*$\n. right: Add name to README(?!#).*$/gm'
340+
# left: '/^ left: *'%payload.pull_request.title%'(?!#).*$\n operator: *===(?!#).*$\n. right: *Add name to README(?!#).*$/gm'
341341
# operator: test
342342
# right: '%actions.fileContents%'
343343
# else:
@@ -379,7 +379,7 @@ steps:
379379
action_id: fileContents
380380
filename: 'config.yml'
381381
- type: gate
382-
left: '/^ - type: respond(?!#).*$\n with: pr-opened.md(?!#).*$/gm'
382+
left: '/^ - type: *respond(?!#).*$\n with: *pr-opened.md(?!#).*$/gm'
383383
operator: test
384384
right: '%actions.fileContents%'
385385
else:

0 commit comments

Comments
 (0)