Closed github-learning-lab[bot] closed 5 years ago
I didn't detect the proper new issue syntax.
I didn't detect the proper new issue syntax.
Great! Now, the repository will have an issue for the learner.
In the last step, we referenced a file titled welcome-text.md
, but it doesn't exist. Learning Lab automatically looks in the :book: responses/
directory for all content files. Let's add it.
/responses/
folder, create a new file titled welcome-text.md
write-steps
branch, and click Create new file, or use this shortcutYou didn't include a response. Make sure that:
responses/wecome-text.md
existsadd-metadata
branchGreat! The learner's repository will now be setup with a single issue.
Let's now dive into the steps:
. This block is composed of :book: steps that are triggered by events
on GitHub, and in turn certain :book: actions
take place. actions
in this context are NOT the same as GitHub Actions.
Each step maps directly to something that the user will do. User interaction on GitHub triggers the step, and Learning Lab responds. The user interaction could be creating a pull request, closing an issue, or editing a file. When designing a course, it's important to plan for the user interactions to reflect what you want them to learn.
Let's name our first step. We will give it a title and a description. These will be shown on Learning Lab, and they help course authors stay organized in the config.yml
file. The docs show :book: syntax and examples of how steps are shown to the learner.
title
and description
for the first step
There's no title for your step.
Great! Your learner now has information about what they're expected to do in this step of the course.
Every step in a course will be triggered by a GitHub Event. All possible events are documented in Events Types & Payloads on the GitHub Developer Guide.
Let's now find the event
that will trigger the step. Because we want the learner to open a new Pull Request, the event we're looking for is pull_request
. Whenever this event occurs, information about the pull request is delivered to Learning Lab. However, if we just write pull_request
, any interaction with a pull request will cause this step to be triggered. We're specifically looking for the learner to open a pull request. We can filter the event to only opened pull requests by using pull_request.opened
instead.
pull_request.opened
event for the first step
Great! Your learner now has information about what they're expected to do in this step of the course.
Every step in a course will be triggered by a GitHub Event. All possible events are documented in Events Types & Payloads on the GitHub Developer Guide.
Let's now find the event
that will trigger the step. Because we want the learner to open a new Pull Request, the event we're looking for is pull_request
. Whenever this event occurs, information about the pull request is delivered to Learning Lab. However, if we just write pull_request
, any interaction with a pull request will cause this step to be triggered. We're specifically looking for the learner to open a pull request. We can filter the event to only opened pull requests by using pull_request.opened
instead.
pull_request.opened
event for the first step
Great! Now let's work on the
before:
block.before:
Anything in this block occurs before the learner can access their course repository.
Learning Lab actions
Actions are reusable modules that each course has access to. They are each designed to do very specific things, and nothing more. This is to optimize for reusability and simplicity. The documentation contains a listing of :book: all available actions.
Step 7: Add to the
before
blockWe'll use the :book:
createIssue
action to create an issue for the learner with some initial instructions. ThecreateIssue
action requires two :book: options:We'll define both of those here, but we'll create the body in the next step.
:keyboard: Activity: Add the
createIssue
actioncreateIssue
action in thebefore:
blockI'll respond below when I detect a commit on this branch.