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

Commit 43b5861

Browse files
committed
validating function creation
1 parent 50c9a0d commit 43b5861

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

config.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
title: Introduction to React
22
tagline: Take your first steps in modern frontend development
3-
description: Learn React
3+
description: In this course, you will learn the basics of React.js through building a gradebook web application to manage assignments, students, and grades.
44
template:
55
name: intro-react
66
repo: react-template
@@ -305,6 +305,17 @@ steps:
305305
- type: respond
306306
with: bad-uncomment.md
307307
issue: Changes
308+
- type: getPullRequest
309+
pullRequest: Changes
310+
action_id: metaPR2
311+
- type: gate
312+
left: '/^\s*addStudent\s*\(\s*studentName\s*\)\s*/g'
313+
operator: test
314+
right: '%actions.fileContents%'
315+
else:
316+
- type: respond
317+
with: bad-function.md
318+
issue: Changes
308319
- type: respond
309320
with: 04-callbackfunctions.md
310321
issue: Changes

responses/bad-function.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Looks you did not create an `addStudent` function with the parameter: `studentName`.
2+
3+
Try again!

0 commit comments

Comments
 (0)