A course step asks the learner to open an issue with title "Hello".
The learner opens an issue with the title "Hi"
An issues event is sent to Learning Lab.
The course uses the issue payload to determine that the issue's title doesn't match what was expected.
A course step asks the learner to commit to their desired branch.
The learner pushes to a branch called feature.
A push event is sent to Learning Lab.
The course uses the push payload to provide respond to the learner in the pull request for the branch.
A course step asks the learner to push code to a repository using continuous integration (CI).
The learner pushes.
The CI provider kicks off a build.
A check_run event is sent to Learning Lab.
The course uses the deployment payload to determine that the CI has started its build, but has not reported a completion.
The CI provider finishes building the repository.
Another check_run event is sent to Learning Lab.
The course uses the new deployment payload to validate that CI has completed.
The course marks that step complete.
Accessing event payloads
The event's entire payload is accessible using the syntax: '%payload%'. We'll usually access it within the list of actions. The information in the payload will vary depending on the event that it accompanies. Examples of all payloads are accessible in Events Types & Payloads.
Within the '%payload%' object, we can use dot notation to access its properties. We'll use the usage examples to demonstrate.
The status of the check run is accessible at '%payload.action%'. Furthermore, the previous status of the check_run is accessible at '%payload.check_run.status%', and its result is at '%payload.check_run.conclusion%'.