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

Commit 6308358

Browse files
committed
validate gate and options
1 parent bb2fd40 commit 6308358

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,16 @@ steps:
333333
description: Use contextual information to validate
334334
event: pull_request.synchronize
335335
actions:
336+
- type: getFileContents
337+
action_id: fileContents
338+
filename: 'config.yml'
339+
- type: gate
340+
left: '/^ left: '%payload.pull_request.title%'(?!#).*$\n operator: ===(?!#).*$\n. right: Add name to README(?!#).*$/gm'
341+
operator: test
342+
right: '%actions.fileContents%'
343+
else:
344+
- type: respond
345+
with: e-no-gate-options.md
336346
- type: respond
337347
with: respond-success.md
338348
- type: octokit

responses/e-no-gate-options.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The gate options aren't how I expected them.

responses/e-no-gate.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
I didn't find a gate action. Please add one.

0 commit comments

Comments
 (0)