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

Commit 9f0fb9c

Browse files
committed
add validation for the step event
1 parent 5a1635a commit 9f0fb9c

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,16 @@ steps:
249249
description: Trigger your first step with a GitHub event
250250
event: pull_request.synchronize
251251
actions:
252+
- type: getFileContents
253+
action_id: fileContents
254+
filename: 'config.yml'
255+
- type: gate
256+
left: '/^\s{2}event: pull_request.opened([^#])+.*$/gm'
257+
operator: test
258+
right: '%actions.fileContents%'
259+
else:
260+
- type: respond
261+
with: e-no-event.md
252262
- type: respond
253263
with: validate.md
254264
- type: octokit

responses/e-no-event.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
You didn't add the event I was looking for: `pull_request.opened`

0 commit comments

Comments
 (0)