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

Commit bb2fd40

Browse files
committed
add validation to gate step, fix prior regexes
1 parent 9f0fb9c commit bb2fd40

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

config.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ steps:
223223
action_id: fileContents
224224
filename: 'config.yml'
225225
- type: gate
226-
left: '/^\s{2}description:([^#]\w)+.*$/gm'
226+
left: '/^ description:(?![ \t]*#).*$/gm'
227227
operator: test
228228
right: '%actions.fileContents%'
229229
else:
@@ -253,7 +253,7 @@ steps:
253253
action_id: fileContents
254254
filename: 'config.yml'
255255
- type: gate
256-
left: '/^\s{2}event: pull_request.opened([^#])+.*$/gm'
256+
left: '/^ event: pull_request.opened(?!#).*$/gm'
257257
operator: test
258258
right: '%actions.fileContents%'
259259
else:
@@ -279,6 +279,16 @@ steps:
279279
description: Validate a learner's PR
280280
event: pull_request.synchronize
281281
actions:
282+
- type: getFileContents
283+
action_id: fileContents
284+
filename: 'config.yml'
285+
- type: gate
286+
left: '/^ - type: gate(?!#).*$/gm'
287+
operator: test
288+
right: '%actions.fileContents%'
289+
else:
290+
- type: respond
291+
with: e-no-gate.md
282292
- type: respond
283293
with: add-context.md
284294
- type: octokit

0 commit comments

Comments
 (0)