diff --git a/config.yml b/config.yml index db9b17f..a67524b 100644 --- a/config.yml +++ b/config.yml @@ -53,6 +53,17 @@ steps: - type: getPullRequest pullRequest: Changes action_id: metaPR2 + - type: getFileContents + action_id: fileContents + filename: 'src/App.jsx' + - type: gate + left: '/^\s*<\s*h3\s*classname\s*=\s*"\s*box-title\s*d-flex\s*flex-justify-center\s*"\s*>\s*GradeBook\s*<\s*\/\s*h3\s*>/gm' + operator: test + right: '%actions.fileContents%' + else: + - type: respond + with: bad-header.md + issue: Changes - type: respond with: 02-props.md issue: Changes @@ -74,6 +85,17 @@ steps: - type: getPullRequest pullRequest: Changes action_id: metaPR2 + - type: getFileContents + action_id: fileContents + filename: 'src/App.jsx' + - type: gate + left: '/^\s*import\s*List\s*from\s*"\s*\.\/List\s*"\s*;\s*/gm' + operator: test + right: '%actions.fileContents%' + else: + - type: respond + with: bad-import.md + issue: Changes - type: createPullRequestComment body: uncomment-assignments-activity.md file: src/App.jsx @@ -121,6 +143,17 @@ steps: - type: getPullRequest pullRequest: Changes action_id: metaPR2 + - type: getFileContents + action_id: fileContents + filename: 'src/List.jsx' + - type: gate + left: '/>\s*{\s*this\.props\.title\s*}\s*<\s*/gm' + operator: test + right: '%actions.fileContents%' + else: + - type: respond + with: bad-prop.md + issue: Changes - type: respond with: 03-state.md issue: Changes @@ -142,6 +175,17 @@ steps: - type: getPullRequest pullRequest: Changes action_id: metaPR2 + - type: getFileContents + action_id: fileContents + filename: 'src/App.jsx' + - type: gate + left: '/\s*students\s*:\s*\[\s*\]\s*,\s*/gm' + operator: test + right: '%actions.fileContents%' + else: + - type: respond + with: bad-state.md + issue: Changes - type: createPullRequestComment body: explaining-this-state-activity.md file: src/App.jsx @@ -231,6 +275,17 @@ steps: - type: getPullRequest pullRequest: Changes action_id: metaPR2 + - type: getFileContents + action_id: fileContents + filename: 'src/App.jsx' + - type: gate + left: '/\s*placeholder\s*=\s*"Add\sStudent\.\.\."\s*\n\s*currList\s*=\s*{\s*this\.state\.students\s*}\n\s*addFunction\s*=\s*{\s*this\.addStudent\s*}\s*\n/gm' + operator: test + right: '%actions.fileContents%' + else: + - type: respond + with: bad-replace.md + issue: Changes - type: createPullRequestComment body: uncomment-grades-activity.md file: src/App.jsx diff --git a/responses/bad-function.md b/responses/bad-function.md index b0cc95c..439bce5 100644 --- a/responses/bad-function.md +++ b/responses/bad-function.md @@ -1,3 +1,3 @@ -Looks you did not create an `addStudent` function with the parameter: `studentName`. +Looks like you did not create an `addStudent` function with the parameter: `studentName`. Try again! \ No newline at end of file diff --git a/responses/bad-header.md b/responses/bad-header.md new file mode 100644 index 0000000..fbfc680 --- /dev/null +++ b/responses/bad-header.md @@ -0,0 +1,3 @@ +Looks like you did not correctly add an `h3` component in the right place in `src/App.jsx`. + +Try again! \ No newline at end of file diff --git a/responses/bad-import.md b/responses/bad-import.md new file mode 100644 index 0000000..5619803 --- /dev/null +++ b/responses/bad-import.md @@ -0,0 +1,3 @@ +Looks like you did not import the `List` component into `App`. + +Try again! \ No newline at end of file diff --git a/responses/bad-prop.md b/responses/bad-prop.md new file mode 100644 index 0000000..c3ef899 --- /dev/null +++ b/responses/bad-prop.md @@ -0,0 +1,3 @@ +Looks like you did not replace the title with a prop in the correct place in `src/List.jsx` + +Try again! \ No newline at end of file diff --git a/responses/bad-replace.md b/responses/bad-replace.md new file mode 100644 index 0000000..f2a141f --- /dev/null +++ b/responses/bad-replace.md @@ -0,0 +1,3 @@ +Looks like you did not replace the props for student rendering. + +Try again! \ No newline at end of file diff --git a/responses/bad-state.md b/responses/bad-state.md new file mode 100644 index 0000000..cf2422d --- /dev/null +++ b/responses/bad-state.md @@ -0,0 +1,3 @@ +Looks like you did not add a `students` state variable. + +Try again! \ No newline at end of file

AltStyle によって変換されたページ (->オリジナル) /